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 » Upp GUI size in Win and Ubuntu
Re: Upp GUI size in Win and Ubuntu [message #40050 is a reply to message #39905] Tue, 28 May 2013 20:54 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Sender Ghost wrote on Fri, 10 May 2013 01:38



	window.Add(text.LeftPos(4, 100).TopPos(4, 20)); // Without Z suffix

}



That seems to work OK.

I filed a bug as each time the package is opened up it adds the 'Z's back in.
http://www.ultimatepp.org/forum/index.php?t=msg&goto=400 49&#msg_40049
Re: Upp GUI size in Win and Ubuntu [message #40052 is a reply to message #40050] Wed, 29 May 2013 11:45 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
nlneilson wrote on Tue, 28 May 2013 20:54

I filed a bug as each time the package is opened up it adds the 'Z's back in.

I think, this is not a bug. This is how it works by default - layout zooming:
Logical positions

Another issue that is related to positions is layout zooming. The problem here is that application can use font of different size or type than standard one used in layout designer when designing layout. That is why layout logical position need to be zoomed. Zoom factor is determined by ratio of text "OK Cancel Exit Retry" in runtime standard font size to Size(99, 13) - size of this text using standard font.

Zooming layout positions is done using placement methods with Z suffix (like LeftPosZ etc...).

Therefore, if you want to use layouts from layout designer, you have about two methods (for your specialized case):
1. Ctrl::NoLayoutZoom();
2. SetStdFont(Font font), where font must be the same (even DPI settings (for screen shots)) on different platforms to achieve the same sizes of layout widgets.

If you want to use placement methods without Z suffix, you could use them manually (as I already said):
Toggle Spoiler

In conclusion, what you wanted is feature, which is not implemented. This feature, like "the possibility to use zoomed and not zoomed versions of placement inside the same layout", might have own consequences.

Edit:
The feature added to Redmine: "Ide (LayDes): Zoomable and not zoomable layout items".

[Updated on: Fri, 31 May 2013 09:32]

Report message to a moderator

Re: Upp GUI size in Win and Ubuntu [message #40060 is a reply to message #40052] Fri, 31 May 2013 20:35 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Thanks Sender Ghost.

I copied Toggle Spoiler and will and go through that.

It was just so many wasted hours until I found the file was being changed. Now I know what it is I can deal with it.

There are many thing in Upp I am not familiar with.
Doing much of my changes away from an internet connection is also a problem.

Thanks!

Re: Upp GUI size in Win and Ubuntu [message #40150 is a reply to message #40052] Sat, 22 June 2013 22:24 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Thanks Sender Ghost for the code as the first time you mentioned this I was lost.

This question is not concerning size but whether the text in a label can be changed. Label 11 is originally " Point 1" with:
	l1.SetLabel(t_(" Point 1")).SetFont(StdFont(11));


Could the text be changed to " Something" in an if block with:
	l1.SetLabel(t_(" Something")).SetFont(StdFont(11));

without changing the Label to EditField?

Sender Ghost wrote on Wed, 29 May 2013 02:45



If you want to use placement methods without Z suffix, you could use them manually (as I already said):

	Label units, l1, l2, l3, l4, l5;

	Add(l1.LeftPos(0, 44).VSizePos(0, 67));
	l1.SetLabel(t_(" Point 1")).SetFont(StdFont(11));
	Add(l2.LeftPos(0, 44).TopPos(16, 16));
	l2.SetLabel(t_(" Point 2")).SetFont(StdFont(11));



Re: Upp GUI size in Win and Ubuntu [message #40151 is a reply to message #40150] Sun, 23 June 2013 11:52 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
nlneilson wrote on Sat, 22 June 2013 22:24

This question is not concerning size but whether the text in a label can be changed. Label 11 is originally " Point 1" with:
	l1.SetLabel(t_(" Point 1")).SetFont(StdFont(11));


Could the text be changed to " Something" in an if block with:
	l1.SetLabel(t_(" Something")).SetFont(StdFont(11));

without changing the Label to EditField?

You already wrote the code to do this:
bool check = true;

Label l1;
l1.SetFont(StdFont(11));
// l1.SetLabel(t_(check ? " Point 1" : " Something"));
// or as external function, void ChangeLabel(bool check = true):
if (check)
	l1.SetLabel(t_(" Point 1"));
else
	l1.SetLabel(t_(" Something"));
Re: Upp GUI size in Win and Ubuntu [message #40153 is a reply to message #40151] Sun, 23 June 2013 22:34 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Thanks Sender Ghost

Got it to work. Using the Labels as set up within the dlg.lay:
	ITEM(Label, dv___6, SetLabel(t_(" Point 1")).SetFont(StdFontZ(11)).LeftPosZ(0, 44).VSizePosZ(0, 67))

Then in the Upp app:
    	dv___6.SetLabel(t_(" Something");


In Win I have not had to switch to doing the GUI setup directly with:
	Label l1, l2, l3, l4, l5;


It's good to know the Labels text can be changed and with both designations of the Labels.

The link you had to the 'U++ framework' or API can that be downloaded or is there plans to have it so it can be downloaded for offline use?
Re: Upp GUI size in Win and Ubuntu [message #40155 is a reply to message #40153] Mon, 24 June 2013 02:33 Go to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
nlneilson wrote on Sun, 23 June 2013 22:34

The link you had to the 'U++ framework' or API can that be downloaded or is there plans to have it so it can be downloaded for offline use?

Actually, possible to access the same topics from U++ TheIDE:
1. Assist -> Help Topics (or F1) menu bar.
2. Used packages -> CtrlLib -> Reference -> Static widgets (or just use "SetLabel" text for Search).

Also there is uppbox/uppweb package to generate html documentation.

Sorry for offtopic.
Previous Topic: Pick Semantics: Passing a Vector to a method
Next Topic: [Solved] SysInfo_Demo_Gui is where to find?
Goto Forum:
  


Current Time: Tue Apr 16 08:27:23 CEST 2024

Total time taken to generate the page: 0.01943 seconds