11-05-2024 03:13 PM
I found an example on the Internet about vertical alignment of the text. I tried to write code that would be more accurate for this functionality, but I'm running into math problems. I would be happy to help.
11-05-2024 04:10 PM
A lot of people (most?) here don't have :V 2024.
Please save your VI as an earlier version.
11-05-2024 08:42 PM
I don't understand the problem you are trying to solve. I know that it involve "text" (so I presume that you are using String functions), but don't know what operations you are trying to do with Strings, except that in involves "Vertical Align" (whatever that is).
Are you trying to get LabVIEW to format a String so that it "fits nicely" into a String Indicator of a particular size? And if so, why?
Can you provide an example of the manipulation of a String that you would like LabVIEW to accomplish?
[You do know that LabVIEW is designed as an "Engineering Workbench" (the "EW" of "LabVIEW"), which have more to do with signals, controls of equipment, visualization of data from instruments, than with Word Processing.]
Bob Schor
11-05-2024 11:40 PM
I'm looking for a property node that can perform the "Lock text in center" functionality. Using the property node called Justification I get horizontal alignment. In order to achieve vertical alignment (so that the text is somewhere in the middle of the string indicator) I need to perform certain actions.
The above code is an example I found online but it doesn't satisfy me. I'm interested in a more accurate way. So I tried (in the code below) to do something like this.
Finally I want to create a subVI that will perform this feature.
11-06-2024 02:42 AM - edited 11-06-2024 02:43 AM
Here are some options I would test if I wanted to do this:
None of these are ideal, but I think that's where I would start.
11-06-2024 09:16 AM
Thank you for your response. I'm interested to hear what do you think about the solution I proposed in the code I sent? Add end of line to the text at the beginning of the sentence, and define its size according to the container and the height of the text.
11-06-2024 11:26 AM
"Lock Text in Center" is a property of boolean controls.
It doesn't affect justification within the text, it affects the position of the text in the boolean.
There is no text property for vertical justification.
Consider using the method; then adjust the position accordingly .