Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Propose a slight change to DropCoice/WithDropChoice
Re: Propose a slight change to DropCoice/WithDropChoice [message #13385 is a reply to message #13358] Thu, 03 January 2008 21:02 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14266
Registered: November 2005
Ultimate Member
tvanriper wrote on Wed, 02 January 2008 17:13

I have this need, sometimes, to iterate over the items within a drop choice, and use that information in some fashion. In particular, I want to give the user the opportunity to modify a 'history' list in some fashion, and the information is generally only stored inside this control.

As of 712-dev1, I am unable to do this without modifying the DropChoice.h file to (safely) expose the underlying objects I need to acquire this information.

I don't see a particular reason why we cannot expose this information in the manner I expose it, so I wonder if we might update DropChoice.h accordingly?

I've included my altered header file.

The file contains the following changes:

to DropChoice (public):

int GetCount() const { return list.GetCount(); }
Value Get( int i ) const { return list.Get( i, 0 ); }


to WithDropChoice (public):

const DropChoice& GetDropChoice() const { return select; }


I hope this is useful.

EDIT

Bah... I had some errors. These should be corrected now, both in this message, and in the header file I've uploaded.. I failed to use the 'return' keyword in GetCount() and Get( int ). Silly me.


OK, why not. I have only slightly changed the idea by putting GetCount and Get directly to WithDropChoice.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon9.gif
Read Message
Read Message
Previous Topic: Refresh Layout
Next Topic: win32 multiscreen / multimonitor problem fix
Goto Forum:
  


Current Time: Fri Jul 18 07:20:32 CEST 2025

Total time taken to generate the page: 0.03827 seconds