LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Line in the Userinterface

Hello
 
i search a simple line on the Userinterface.
It is only a seperator from 2 sides.
 
Thanks
0 Kudos
Message 1 of 17
(4,359 Views)

Hello,

you could use a canvas, draw a line in it and make the background transparent.

0 Kudos
Message 2 of 17
(4,357 Views)

You can also use a "splitter" from the create menu. 

They are a little more artistic looking than just a line.  Your choice.

0 Kudos
Message 3 of 17
(4,348 Views)

You can also use text messages filled with the corresponding character from NISYSTEM font: all the lines on this panel are "drawn" this way



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 17
(4,337 Views)
Hello
 
thanks for your ideas. I think i take the first alternative.
 
by
0 Kudos
Message 5 of 17
(4,316 Views)

Roberto,

    I'm curious as to what you were saying.  Can you give a little more detail?  All those lines are really text strings?

What do you mean by "corresponding characters"?  Is the text background just set to black?  Is width of the line adjusted by font size?

Thanks.  Just trying to learn more tricks.......

0 Kudos
Message 6 of 17
(4,309 Views)
scomack,
if you look as NISYSTEM font in charmap, you can see that this font contains a lot of characters that can be used to draw boxes and lines (I was used to use them in old DOS Basic programs Smiley Happy as an example │─┌─┴┼──┐ - I hope this characters will be correctly redered in your browser).
At this point you can use a text box with transparent background set with NiSystem font and filled with appropriate chacters (─ this is Alt+196; │ this is Alt+179) to mimic the lines.
 
I am attaching the panel in uir format so that you can elaborate on this.
 
Regards
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 17
(4,301 Views)
Interesting! Although I'm not sure how portable this approach is. For example, I don't get the same characters on my laptop as Roberto describes. Perhaps it depends on the codepage (?) setting of the PC?
 
JR
0 Kudos
Message 8 of 17
(4,300 Views)
JR, I was afraid of local pc settings influencing the visual effect of this solution. How did you tried it? Via the numeric code on the keypad or copying and pasting the characters from charmap? In the first case you may need to prefix a '0' to the numeric code (as an example Alt+0196 for horizontal bar) as text fields; passing through charmap application seems nevertheless the surest solution.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 9 of 17
(4,288 Views)

Roberto,

After much experimentation I have found that the only way to insert the correct characters is via the charmap application, using its copy function and then pasting into a CVI text message. No success at all with the Alt+0179 type approach, no matter how many different ways I tried it. Perhaps it is a problem with my laptop setup somewhere?

Are the fonts reliably available on other, non-CVI devlopment machines? Do the lines/boxes keep their appearance if the uir is used on another PC with different resolutions, for example when the Resolution Adjustment feature is used? Or do you not allow such an automatic resize in your programs? (I don't.)

An interesting approach, but my personal favourite is to use Paint (or similar) to draw a bitmap of any unusual or complex uir features and simply place it on a canvas. I needed to do that once for a line at 45 degrees - that might be a bit of a challenge for the text message approach! Smiley Tongue

JR

0 Kudos
Message 10 of 17
(4,282 Views)