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 » WhenSelected callback to DropList
Re: WhenSelected callback to DropList [message #26338 is a reply to message #26319] Mon, 26 April 2010 10:32 Go to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
Sc0rch wrote on Sat, 24 April 2010 03:42

Hello all!

I think, it will be good idea to add WhenSelected-callback to DropList.

My variant:
DropChoise.h
class DropList ...
...
Callback WhenSelected;
...


DropList.cpp
void DropList::Select() {
	int c = list.GetCursor();
	if(c >= 0)
		value = key[c];
	if(dropfocus)
		SetFocus();
	Sync();
	UpdateAction();
	WhenSelected.Execute();
}


Best regards,
Anton


UpdateAction above calls generic WhenAction (like for almost any other widget when user changes the value of widget). (It also sets modify flag for widget).

Is WhenSelected supposed to be any different?

Mirek
 
Read Message
Read Message
Previous Topic: Images for disabled button in "Classic" style
Next Topic: QTF with QtfRichObject as Button label causes crash
Goto Forum:
  


Current Time: Mon Jun 09 12:02:40 CEST 2025

Total time taken to generate the page: 0.04244 seconds