Text alignment in pulldowns

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10509
Joined: Wed May 06, 2009 2:28 pm

Text alignment in pulldowns

Post by dunbarx »

The textAlign property of any of the four "pullDown" style buttons works as advertised once the selection is made. But the alignment is always left-justified when the actual gadget is "open". If I have the following in the contents of the button, for example:

Select A Letter
A
B
C

I have had (just to improve the looks of these things during the actual selection process) to pad the menuItems with spaces. But I have to be careful, I must remember to extract the first word of the selectedText, and not just the selectedText itself.

That sort of thing. So am I missing something simple? Or is this an OS thing?

Craig Newman
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Text alignment in pulldowns

Post by FourthWorld »

It's a combination of an OS thing and an IDE bug: the OS HIGs require left alignment, but the IDE mistakenly creates option controls with centered labels.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Post Reply