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 » Layout not visible
Layout not visible [message #55534] Fri, 20 November 2020 03:25 Go to next message
steveo is currently offline  steveo
Messages: 11
Registered: November 2020
Promising Member
So I am trying to implement a simple modal dialog with a layout.
I have added a new layout to my layout file for the package called "NewPasswordDlgLayout"
I have created a class like this in the main package.h file along with my MainWindow:

class NewPasswordDialog : public WithNewPasswordDlgLayout<TopWindow> {
protected:
	String password;
	String passwordVerify;
public:
	
	NewPasswordDialog();
};



I am attempting to invoke the dialog like this:

int result = NewPasswordDialog().Run(true);


It shows a window but does not show any of the controls I added to the layout and I don't understand why.
Re: Modal vs non-modal window [message #55535 is a reply to message #55534] Fri, 20 November 2020 09:59 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Do you call CtrlLayout[OK][Cancel] in the constructor?

Mirek

[Updated on: Fri, 20 November 2020 10:01]

Report message to a moderator

Re: Layout not visible [message #55549 is a reply to message #55534] Fri, 20 November 2020 21:44 Go to previous message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Steveo,

Welcome on our forum Smile

Thanks for this question - I added short description to layout tutorial why CtrlLayout[OK][Cancel] is required and what it does. Should be available on the site tomorrow.

Quote:
In order to initialize layout CtrlLayout() method needs to be called from constructor. Without it the controls placed on layout will not be visible.


Klugier


U++ - one framework to rule them all.
Previous Topic: Pie Chart in U++?
Next Topic: How to Mask Input fields
Goto Forum:
  


Current Time: Sat Apr 20 05:11:10 CEST 2024

Total time taken to generate the page: 0.04453 seconds