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++ TheIDE » U++ TheIDE: Layout (Forms) Designer » Nothing shows up...
Nothing shows up... [message #1480] Mon, 06 March 2006 07:41 Go to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
I'm playing with this code, and the program stopped showing the buttons that are on the layout form.

Is there a way to toggle between the layout display and the text file?

I've uploaded a copy of the layout file. Is it corrupted?

Edit I found my problem. I wasn't calling CtrlLayout(*this, "");

  • Attachment: Conquest.lay
    (Size: 1.14KB, Downloaded 1731 times)

[Updated on: Mon, 06 March 2006 07:44]

Report message to a moderator

Re: Nothing shows up... [message #1482 is a reply to message #1480] Mon, 06 March 2006 08:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11701
Registered: November 2005
Ultimate Member
iplayfast wrote on Mon, 06 March 2006 01:41

I'm playing with this code, and the program stopped showing the buttons that are on the layout form.

Is there a way to toggle between the layout display and the text file?

I've uploaded a copy of the layout file. Is it corrupted?

Edit I found my problem. I wasn't calling CtrlLayout(*this, "");




BTW, I have seen "OK" variable name in the layout, better use "ok" so that you can use CtrlLayoutOK...

Mirek
Re: Nothing shows up... [message #1490 is a reply to message #1482] Mon, 06 March 2006 16:45 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
I assume I'll be able to find out what you are talking about in the docs somewhere?

The biggest problem I'm having is that I haven't been able to find the pattern for all controls. For example I looked for about 1/2 hour to find how to check or change the status of a checkbox.

I'm thinking that I must be missing some basic concept.
Re: Nothing shows up... [message #1495 is a reply to message #1490] Mon, 06 March 2006 17:39 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11701
Registered: November 2005
Ultimate Member
Quote:



The biggest problem I'm having is that I haven't been able to find the pattern for all controls. For example I looked for about 1/2 hour to find how to check or change the status of a checkbox.

I'm thinking that I must be missing some basic concept.


Well, the very basic pattern is quite simple:

Use operator~ to get the value of Ctrl.
Use operator<<= to set the value of Ctrl.
Use WhenAction (also operator<<=) to assign action to be done when user changes the value of Ctrl.

I agree some nice tutorial is needed...

Mirek
Re: Nothing shows up... [message #1497 is a reply to message #1495] Mon, 06 March 2006 18:34 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
OK, that is very helpful. One more question. (since you are watching).

I've got 2 layouts, the game and the options. From what I've read these controls on these layouts are built into the class so the values are always present.

To access a ctrl (say a checkbox called Multiplayer) in the option layout from the game class I would do
bool value = options.Multiplayer ~;
and
options.Multiplayer <<= value;

Is this correct?
Re: Nothing shows up... [message #1498 is a reply to message #1497] Mon, 06 March 2006 18:46 Go to previous message
mirek is currently offline  mirek
Messages: 11701
Registered: November 2005
Ultimate Member
iplayfast wrote on Mon, 06 March 2006 12:34

OK, that is very helpful. One more question. (since you are watching).

I've got 2 layouts, the game and the options. From what I've read these controls on these layouts are built into the class so the values are always present.

To access a ctrl (say a checkbox called Multiplayer) in the option layout from the game class I would do
bool value = options.Multiplayer ~;
and
options.Multiplayer <<= value;

Is this correct?



Yes. (Just "value = ~options.Multiplayer").

Option also has alternative interface - operator= and operator bool(). Means you will not in most cases need "bool value", just

if(options.Multiplayer)
....

options.Multiplayer = true;

Note that you can even serialize content of dialog to make this persistent. No need to store data in paralel structures (in most cases).

Mirek
Previous Topic: layout editor [BUG][FIXED]
Next Topic: Layout 602 Fedora/Gnome [BUG]
Goto Forum:
  


Current Time: Tue Feb 19 09:56:45 CET 2019

Total time taken to generate the page: 0.00687 seconds