It is currently Mon Aug 20, 2018 8:35 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to right-align TextGadgets in Form Designer?
PostPosted: Sun May 13, 2018 9:20 pm 
Offline
User
User

Joined: Thu May 03, 2018 4:24 pm
Posts: 27
The designer doesn't use actual controls but instead draws the gadgets on the screen. I understand the design decision -- PureBasic is multi-platform, but each platform has its own controls. However, since the designer's font and the actual control font when running are not the same font, this makes gadget alignment difficult. It's not a problem with gadgets that are aligned on their left side, but it's an issue with field labels, which are often aligned on the right, like this:

Image

I realized that if you adjust the gadget positions by hand until they line up, that only means they will line up under the platform you're working on (Windows in this case). On a different platform, they will again be out of alignment.

I suppose one option is not to align fields labels on the right. Any other ideas?


Last edited by RobertSF on Tue May 15, 2018 2:54 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: How do you handle this quirk in the designer?
PostPosted: Sun May 13, 2018 9:38 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 2085
Location: Singapore
RobertSF wrote:
...it's an issue with field labels, which are often aligned on the right...

One workaround would be to create the labels with equal widths, align them, then use the #PB_Text_Right flag to align the text to the right.

_________________
Texas Instruments 99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: How to right-align TextGadgets in Form Designer?
PostPosted: Mon May 14, 2018 2:55 am 
Offline
User
User

Joined: Thu May 03, 2018 4:24 pm
Posts: 27
OMG, that was so easy! I must have had a brain burp. Anyway, in case it helps someone else, here's the full how-to.

You can't align gadgets on their right side, but if you need some right-justified field labels, start by making them all as large as the largest one. Align them on their left sides. Then check the box for #PB_Text_Right Constant on each gadget. It's at the bottom of the list of gadget properties. Now they will be nicely right-aligned!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye