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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » How to create a modal dialog
Re: How to create a modal dialog [message #2300 is a reply to message #2299] Fri, 07 April 2006 09:21 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
forlano wrote on Fri, 07 April 2006 01:59

I have noticed that the

btnOpen <<= THISBACK(myCallback);

works only for members of the class. While if you want have access to a function out the class you must use

btnOpen.WhenAction = callback(OpenDialog);



Correct. Also, you can call callback of another instance.

btnOpen.WhenAction = callback(object_ptr, &ObjectClass::Method)

Note that Ctrl::WhenAction can also be assigned using '<<=':

btn <<= callback(OpenDialog);

Quote:


How to create a non modal dialog?



Make it a member of your main window class - that way it will not be closed at the and of scope by destructor (you will have to add code for closing it as well).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to call the methods of a class from another class
Next Topic: How to add a three state button in an ArrayCtrl
Goto Forum:
  


Current Time: Wed May 15 11:21:38 CEST 2024

Total time taken to generate the page: 0.01687 seconds