From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

text justification in enum and ring

The following image (from the attached VI):

 

Namednumeric text shift.png

 

Are one enum and three rings (top to bottom) which all return identical results for Control.MasterRectangle, Ring Text.Master rectangle and so on.

 

According to VI Server, the text of the named numeric ring should be positioned exactly the same in all of these controls (unless my VI server knowledge is rusty) but they clearly are not.  The top one (enum) has the text shifted way left.  The second and fourth seem the same whereas the third is again shifted (albeit it only by a single pixel).  These three are all Rings.

 

Spoiler
The first person to say an Enum shouldn'0t be on the UI gets no kudos.  Smiley Mad

Anyone got any idea how this happens or how I can fix ? It's kind of messing up our UI.

 

These controls all went through numerous rounds of properties being read and written during a recent UI change in our software.

 

LV 2012 SP1

Message 1 of 8
(3,333 Views)

Rings and Enums.png

Well, I can tell you how I did this -- I created it that way!  The first entry in the Ring or Enum (entered using the right-click, Edit method) had no leading space, the next had one, the last had two).  WYSIWYG.  I'll note that both the Ring and Enum appear similarly spaced (this example is from LabVIEW 2014, but I'm pretty sure that earlier versions will do similar things).  I did notice one of your examples started with a capital "I", an unusually "narrow" letter -- could this (also) be a Font thing?

 

Bob Schor

0 Kudos
Message 2 of 8
(3,308 Views)

Hi Bob,

 

have you looked at the controls on the FP of the VI I attached?  I checked them for leading spaces but they don't have any.  All of the strings show no leading spaces (at least on my machine).

 

They all also have the exact same font (Tahoma 13 regular).

0 Kudos
Message 3 of 8
(3,292 Views)

These controls look like system style. Is that correct? If so, is there a possibility to perform the same actions on native LabVIEW Ring/Enum Controls and check whether this behaviour is persistent?

 

The little checks I did myself yielded no reason why there should be an offset of any kind on the left side of the controls. No codes, no non-printable characters or anything of the sort.Smiley Sad

0 Kudos
Message 4 of 8
(3,263 Views)

No, I think they're classic style (loriginally at least)  They've been heavily customised (which was a major PITA to be honest).

0 Kudos
Message 5 of 8
(3,257 Views)

Maybe related to this:

Graph Y Label Bug.png

Obviously the Y label is not centered, but there's no way to move it. And no, no spaces in the label. See attached VI (LV2012).

 

The y labels just seem to be torn down by gravity occasionally Smiley Mad

 

0 Kudos
Message 6 of 8
(3,238 Views)

Sorry, I didn't see there was an attachment.  Now that I do see it, I've tried taking your controls "apart" and figuring out what makes them tick.  Pretty obscure -- I couldn't budge them very much, and certainly was unable to adjust the difference in identation.  It will be interesting to see how this happened ...

 

Any hints on what you did to create these?  They do involve some level of customization, no?  Something other than the simple Edit tools on the Typedef/Control window?

 

BS

0 Kudos
Message 7 of 8
(3,205 Views)

@Bob_Schor wrote:

Any hints on what you did to create these?  They do involve some level of customization, no?  Something other than the simple Edit tools on the Typedef/Control window?

 


Well they weren't created by me personally.  They did involve a bit of work, but nothing beyond the usual customise options.  They have been recoloured / properties read and written via a property copier code I have written (pretty extensive, every normal and scripting property was read and written at least once).  But this is the same for all of the controls here, no real differences.

0 Kudos
Message 8 of 8
(3,175 Views)