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 » Solved: How to use WhenCancel callback for DropList
Solved: How to use WhenCancel callback for DropList [message #39040] Sat, 09 February 2013 11:14 Go to next message
hmasr is currently offline  hmasr
Messages: 8
Registered: January 2013
Promising Member
How to use the WhenCancel callback for the DropList.GetList(). Or any other way to detect that the user canceled the selection (by pressing cancel or clicking outside the dropped list)
I tried the following in the DropList subclass:

This->GetList().WhenCancel=THISBACK(OnCancelSelect);

But it is giving error.
Appreciate any help with example if possible
Thanks in advance

[Updated on: Sun, 10 February 2013 08:34]

Report message to a moderator

Re: How to use WhenCancel callback for DropList [message #39044 is a reply to message #39040] Sat, 09 February 2013 12:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13995
Registered: November 2005
Ultimate Member
void CancelPrompt()
{
	Exclamation("Canceled");
}

GUI_APP_MAIN
{
	DropList list;
	list.ListObject().WhenCancel = callback(CancelPrompt);
	TopWindow win;
	win.Add(list.HSizePos().TopPos(0, Ctrl::STDSIZE));
	list.Add("Something");
	win.Run();
}
Solved: How to use WhenCancel callback for DropList [message #39048 is a reply to message #39044] Sun, 10 February 2013 08:32 Go to previous message
hmasr is currently offline  hmasr
Messages: 8
Registered: January 2013
Promising Member
So it is the ListObject not the GetList Rolling Eyes
Many thanks and appreciate the prompt response.
Previous Topic: Display widgets Tip on StatusBar
Next Topic: Problem in CodeEditor
Goto Forum:
  


Current Time: Sat Jul 20 08:46:16 CEST 2024

Total time taken to generate the page: 0.01854 seconds