PDA

View Full Version : Vizinfo box: help with aligning text


Woosuk Jang
07-09-2010, 11:55 AM
We have a program that uses the vizinfo box with text next to radio buttons inside but for some reason the text aligns itself to the rightmost side (closest to the radio buttons) and I'm having trouble trying to get it left-aligned.

The snippet looks like:

subTalk = vizinfo.add("")
...
aRadio = subTalk.add(viz.RADIO, 0, Level1[0]); bRadio = subTalk.add(viz.RADIO, 0, Level1[1]); cRadio = subTalk.add(viz.RADIO, 0 ,Level1[2])

Where Level1 is the array with the various text in it. Any help on getting it to be left-aligned without modifying the text?

Thanks.

Jeff
07-12-2010, 05:02 PM
You could use the alignment method on the vizinfo box:
subTalk.alignment(viz.TEXT_LEFT_CENTER)

You may also want to take a look up the vizdlg module in the Vizard docs. That will allow you to add GUIs and other elements to panels and have more control of their placement.

Woosuk Jang
07-13-2010, 07:33 AM
I attached the bmp file showing how the info box looks like. Each line of text is now left-aligned as we wanted but the problem is that the radio buttons are shifted as well.

Is there any way to have only the text aligned to the leftmost side and have the radio buttons aligned to the right?

Thanks,

Woosuk Jang
07-15-2010, 12:43 PM
Hi,
I realize you can manually set the positions of the radio buttons. However, we have plenty of sets of texts and it will be extremely inefficient and time-consuming to set the positions of every radio button for every labels. Any way to solve this mess?

Thanks,

Jeff
07-15-2010, 04:01 PM
Try adding the GUIs to a panel object of the vizdlg module. That will allow for more flexibility in positioning them.