取消
显示结果 
搜索替代 
您的意思是: 

Aligning Boolean Control to Plot Legend

Any ideas on how best to align an array of tick boxes against a plot legend?

I have a 1D array of Boolean controls and I want to use them to enable/disable the plots on a XY graph but I'm having problems getting the controls to line up with the legend text.

I've tried using element gaps in the array but there seems to be little control of the gap that is used. I've also tried creating a custom control and modifying the control height but I still can't get an exact alignment of the control to the legend text. I've also tried using different fonts for the legend text but it doesn't help.

I don't really want to use individual controls and would prefer to continue using an array if possible but I can't help thinking I'm missing something obvious!?

I've attached and example of the problem and would welcome any suggestions....
0 项奖励
1 条消息(共 10 条)
5,492 次查看
Sorry the attachment seemed not to be on my first posting
0 项奖励
2 条消息(共 10 条)
5,480 次查看
You can customize the control to a larger size. (See attached modification).

Basically: (1) Right-click the control, select "customize...". (2) In the control editor switch from edit mode to customize mode. Select the sqaure and use the sizing tool.
0 项奖励
3 条消息(共 10 条)
5,468 次查看
Sorry, apparently the resize operation does not survive a save operation. 😞 Weird! It looks just fine until closed and reopened.

Here's an approach that actually works: Just use a plain boolean button and import the appropriate checkbox graphics into the true and false cases, again using the control editor.

See if this suits your needs!
4 条消息(共 10 条)
5,463 次查看
Well, I did not really like these huge checkboxes, they look too dominant.

A slightly more appealing approach would be to import "regulation size" checkboxes padded a bit on top and bottom to give them the correct height. In the attached example, I placed them in a transparent array container. See for yourself. 🙂
5 条消息(共 10 条)
5,453 次查看
Great solution and thanks for your help. Like you I prefer the regular checkbox size with the spacing.

So I was on the right track with using a custom control after all which makes me feel a little better.

Thanks again

Tony
0 项奖励
6 条消息(共 10 条)
5,446 次查看
HI there, can you please post a copy of the vi in labview 7.0. thanks.
0 项奖励
7 条消息(共 10 条)
5,416 次查看
Here is a copy of the last program in version 7.0
0 项奖励
8 条消息(共 10 条)
5,409 次查看
Hi,

I had the same problem. I wanted to do as you enabling/disabling a plot and placing the switch next to the legend. I checked the proposed solution using pictures on the controls but in this case the color of array element do not changeable programmatically or by the op. system. (General I prefer using colors from the op.system, supposed all the user sets the windows appearance to their "spirit")

I found an other work-around to position an element in a cell of array. Enabling the label and caption (or boolean text) of the element and position them to reach the desired position of control. Feed them by empty string or space. Then send them behind the control.


Tomi
0 项奖励
9 条消息(共 10 条)
5,384 次查看

My workaround was an array of cluster, where I size the cluster. Involve two extra subvis for the UI, but is quite flexible.

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 项奖励
10 条消息(共 10 条)
4,731 次查看