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 » TopWindow&PopUp, TrayIcon » How to call a new window?
How to call a new window? [message #34448] Wed, 23 November 2011 00:58 Go to next message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
Hey guys!
I have a Main window that has layout.
I created another layout for a settings window. How do I call this window?

Thanks
Re: How to call a new window? [message #34451 is a reply to message #34448] Wed, 23 November 2011 07:26 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

lectus wrote on Wed, 23 November 2011 00:58

Hey guys!
I have a Main window that has layout.
I created another layout for a settings window. How do I call this window?

Thanks

The window can be opened using MyWin.Run(). There are also other methods: RunAppModal(), Execute(), ExectueOK(), ExecuteCancel(), see the topwindow reference for details about all of them.

Best regards,
Honza
Re: How to call a new window? [message #34456 is a reply to message #34451] Wed, 23 November 2011 10:26 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
I used .open as you can see it in the gui tutorial.
GUI Tutorial

best regards,
Wolfgang

[Updated on: Wed, 23 November 2011 10:28]

Report message to a moderator

Re: How to call a new window? [message #34464 is a reply to message #34448] Wed, 23 November 2011 15:54 Go to previous messageGo to next message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
Thanks!

But does this apply to Windows with layouts?

I tried:
WithMyDialogLayout<TopWindow> w;
CtrlLayout(w);
w.Run();

It seems to work.
But I don't know if this is the right way.

EDIT:
I think I got how it works:
WithMyDialogLayout<TopWindow> w;
CtrlLayoutOKCancel(w,"test");
if(w.ExecuteOK())
	Exclamation("Selected ok");


Thanks for the information guys! Smile

[Updated on: Wed, 23 November 2011 16:02]

Report message to a moderator

Re: How to call a new window? [message #34486 is a reply to message #34464] Fri, 25 November 2011 13:11 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
lectus wrote on Wed, 23 November 2011 09:54

Thanks!

But does this apply to Windows with layouts?



Sure. There is no difference between windows with or without lauyouts...

There is also no magic about layouts:

WithMyDialogLayout<TopWindow> w;


This only adds alls widgets of layout as member variables of a new class derived from TopWindow (and yes, TopWindow is not mandatory, you can use any other base).

CtrlLayout(w);


This sets properties of those widgets as defined in layout designer - it includes positions as well.

Mirek
Previous Topic: TrayIcon test V2
Next Topic: TopWindow::SerializePlacement () on dual-head display
Goto Forum:
  


Current Time: Fri Mar 29 02:11:16 CET 2024

Total time taken to generate the page: 0.01743 seconds