08-03-2023 02:16 AM
我用labview开发了一个项目,界面设计中,有部分控件我只想纵向放大,也就是说当前面板尺寸左右拉伸时该控件不会横向放大或缩小;当前面板上下拉伸时,此部分控件会随着前面板上下拉伸。该部分控件我通过分割栏放置在同一个窗格里。要么横向,纵向都会放大,要么就不能放大。希望有过类似经历的大神能给与直到。
Solved! Go to Solution.
08-03-2023 07:14 AM
Right click the vertical splitter, set its properties.
See attached VI.
08-03-2023 08:45 PM
08-03-2023 11:13 PM - edited 08-03-2023 11:22 PM
5 controls grow vertically is not an easy task.
I would suggest rearrange these ctrls: put the 3 buttons together, fixed size;
separate buttons and the other 2 string with 2 horizontal splitter.
As for figure 2, you have to use event structure to catch the mouse down event, disable the string "Fit Control to Pane" property.
08-04-2023 03:06 AM
谢谢!按照您的建议,我采用了每个控件都分割的方式,这样当垂直分割栏左右移动时,控件随之拉伸或收缩,不会变形;之前5个控件放在一起,当垂直分割栏一直移到左边位置(不能再移动),然后再向右移动时,控件的长度会发生改变,不知道原因是啥;另外想通过改变控件的区域高度来实现,发现该属性是只读属性。