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 » Community » Newbie corner » How to focus a dialog
How to focus a dialog [message #37656] Tue, 30 October 2012 23:06 Go to next message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
I created a dialog that runs over the main form. In .NET such a dialog has focus by default. I mean that you cannot focus the main form until the dialog is closed.

I noticed that in U++ a dialog is always on top of the main form, but I can still focus the main form. Is there a way to make the main form unfocusable until I closed my dialog?
Re: How to focus a dialog [message #37659 is a reply to message #37656] Wed, 31 October 2012 06:46 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Yes, you can. It is called modal and modeless dialogs. It seems you created modeless dialog instead of modal one. To create modal dialog in U++ you have a number of techniques (see Help for "Modal" inside TheIDE). The quickest way seems to call Execute() for your dialog object (notice that you also have ExecuteOK()/ExecuteCancel()).
Re: How to focus a dialog [message #37662 is a reply to message #37656] Wed, 31 October 2012 09:16 Go to previous message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
That worked! Thanks for your help Smile
Previous Topic: error LNK2019 when using CtrlLib/CtrlLib.h
Next Topic: Recent Problem with all u++ apps on Ubuntu 12.04
Goto Forum:
  


Current Time: Sun Sep 26 23:52:12 CEST 2021

Total time taken to generate the page: 0.00851 seconds