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 » DropList with "quick trigger option": best way to implement?
DropList with "quick trigger option": best way to implement? [message #4909] Thu, 24 August 2006 22:16 Go to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
I want a DropList which triggers an external action not only when the widget view is clicked (WhenClick) but already when a DropList item is selected (list.WhenSelect).

It is quite easy to achieve this by deriving MyDropList from DropList and overriding Select().

But I don't like this solution. It appears too complicated. Above all good C++ policy forbids to override non-virtual base class functions and Select() is a non-virtual function.

Is there a simpler or at least "cleaner" solution?

Werner
Re: DropList with "quick trigger option": best way to implement? [message #4915 is a reply to message #4909] Fri, 25 August 2006 00:21 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am not completely sure I understand.

Do you need callback to be invoked when you are goind through the pop-upped list?

Mirek
Re: DropList with "quick trigger option": best way to implement? [message #4919 is a reply to message #4915] Fri, 25 August 2006 06:53 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member

luzr wrote on Fri, 25 August 2006 00:21

I am not completely sure I understand.

Do you need callback to be invoked when you are goind through the pop-upped list?

Mirek


Not exactly. I want to perform an action as soon as a new item is selected.

For instance think of the "reference / Display" example and imagine the DropList to be near a control in which you can read a text (= target). As soon as an item in the pop-upped list is clicked, the target font should change accordingly. (Normal behavior is that clicking one item of the list just changes the DropList control itself so that another click is needed to change the appearance of the text. Basically I just want to avoid one click Very Happy .)

Werner

[Updated on: Fri, 25 August 2006 06:54]

Report message to a moderator

Re: DropList with "quick trigger option": best way to implement? [message #4922 is a reply to message #4919] Fri, 25 August 2006 09:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
That is default WhenAction.

WhenAction, the basic Callback defined in Ctrl, is called by most (not all) widgets each time when user (!) changes the status of widget. Usually, with the exception of Button, "changes the status of widget" means that the Value of widget has changed.

Just use <<= to assign the callback.

Mirek

Re: DropList with "quick trigger option": best way to implement? [message #4929 is a reply to message #4922] Fri, 25 August 2006 17:07 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Fri, 25 August 2006 09:40

That is default WhenAction.

WhenAction, the basic Callback defined in Ctrl, is called by most (not all) widgets each time when user (!) changes the status of widget. Usually, with the exception of Button, "changes the status of widget" means that the Value of widget has changed.

Just use <<= to assign the callback.

Mirek


Thank you very much!

Shocked I knew that there was a very simple solution. Surprised

May I respectfully suggest to transform this reply into a piece of (easy to find) documentation? Rolling Eyes Or have I missed the corresponding topic? Embarassed

Werner
Re: DropList with "quick trigger option": best way to implement? [message #4946 is a reply to message #4929] Sun, 27 August 2006 20:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
http://upp.sourceforge.net/srcdoc$CtrlLib$Tutorial$en-us.htm l

ch 13

or Ctrl documentation.

Mirek
Re: DropList with "quick trigger option": best way to implement? [message #4954 is a reply to message #4946] Sun, 27 August 2006 20:45 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Sun, 27 August 2006 20:01

http://upp.sourceforge.net/srcdoc$CtrlLib$Tutorial$en-us.htm l

ch 13

or Ctrl documentation.

Mirek



Sad I plead guilty. Crying or Very Sad

Werner
Re: DropList with "quick trigger option": best way to implement? [message #4962 is a reply to message #4954] Sun, 27 August 2006 22:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Do not. Tutorial is quite new thing.

I guess it would still have sense to make another short summary of basic U++ techniques / features. Posts like yours help me to identify areas...

Mirek
Re: DropList with "quick trigger option": best way to implement? [message #4974 is a reply to message #4962] Mon, 28 August 2006 21:57 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Sun, 27 August 2006 22:56

...

I guess it would still have sense to make another short summary of basic U++ techniques / features. Posts like yours help me to identify areas...

Mirek


I would appreciate a short outline telling me what Ultimate++ does when it is notified of an event by the OS Smile .

And I would appreciate documentation where functions and defines are in alphabetical order Rolling Eyes .

Werner
Re: DropList with "quick trigger option": best way to implement? [message #4975 is a reply to message #4974] Mon, 28 August 2006 23:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Quote:


I would appreciate a short outline telling me what Ultimate++ does when it is notified of an event by the OS Smile



Calls virtual method of Ctrl...

Quote:


And I would appreciate documentation where functions and defines are in alphabetical order Rolling Eyes .



Is not full-text search better?

I even plan to connect it to some hotkey (like you press e.g. Alt+F1 on "RectTracker" and TheIDE shows all topics with "RectTracker" contained).

Mirek
Re: DropList with "quick trigger option": best way to implement? [message #4993 is a reply to message #4975] Tue, 29 August 2006 21:24 Go to previous message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
Quote:

Quote:

And I would appreciate documentation where functions and defines are in alphabetical order Rolling Eyes .


Is not full-text search better?

I even plan to connect it to some hotkey (like you press e.g. Alt+F1 on "RectTracker" and TheIDE shows all topics with "RectTracker" contained).

Mirek


Not with me:

1.
I don't believe in the paperless office. In many cases simple paper is the handiest.

2.
Full text search would be great - if it worked ... Rolling Eyes
Take for example "WhenAction":
a) I click on "Help Topics".
b) The tree opens up and shows among other things "Ctrl".
c) I start scrolling and looking for "WhenAction".
d) I'm still scrolling and looking Confused .
e) Same as d) Crying or Very Sad
f) I fail to see it Evil or Very Mad .
Or - one of my favorite questions - am I doing it wrong?

Werner
Previous Topic: OcxConnectionPointContainer
Next Topic: design custom controls
Goto Forum:
  


Current Time: Fri Apr 19 06:34:41 CEST 2024

Total time taken to generate the page: 0.05366 seconds