11-23-2022 04:21 AM - edited 11-23-2022 04:58 AM
Hello all!
I want to create a message popup with varying text. The text is in a transparent string indicator that line wraps the text and auto-stretches the height. This works so far.
But due to the auto-stretch, the vertical position of the string box changes. So I want to position it in the vertical center of the message window. Problem: I don't get the real size of the panel.
-> The FP grid is 10 pixels, the FP is approx. 80 pixels of height. The FP range height reads out as 73. The window height reads as 114, because it includes the title bar. With those values I cannot place the text box in correct vertical center. The only value that's correct here is the string box height.
Ideas to solve this? Thanks in advance.
Solved! Go to Solution.
11-23-2022 04:31 AM
Addition: I found out that "range height" is the height of the panel occupied by elements. 🙄
11-23-2022 05:25 AM
You want to get the panes size, that is subclass of the VI, and a VI can have more than one pane (if you use splitters).
11-23-2022 06:21 AM
Found it. There is a property called "Areas" or so (german: Bereiche), which puts out an array of references. In my case it's only one. If I use that
to read the area height, I get the adjusted height of the visible panel area according to the grid:
or
-> Text is nicely vertically centered.
11-23-2022 06:24 AM
11-23-2022 07:21 AM
@MaSta wrote:
Hello all!
I want to create a message popup with varying text. The text is in a transparent string indicator that line wraps the text and auto-stretches the height. This works so far.
As a side note, the build in Three Button Dialog does this.
If you give buttons empty labels, they're not shown. This gives you a one button dialog with resizable text.
You could simply use this dialog, or study this dialog as inspiration.