LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I hide and display a message on my panel?

Hi.
I want to hide and display a message on my Panel.
I started whith a text message initialy hiden and now I want to display it. On my aplication I need to hide it again therefore I need a function to do that.

Thanks.
0 Kudos
Message 1 of 4
(3,275 Views)
Hi,
Just load at the start a new UIR with your message.
When you want to open it, just call your UIR by the DisplayPanel() function.
You can hide it by the HidePanel() function.

Yvan
--


******************************
YBDesign
Yvan BOURNE
Tel : 04.92.75.82.81
Fax : 04.92.75.82.82
Portable : 06.88.08.27.42
http://www.ybdesign.fr
******************************



"tmaxial" a écrit dans le message de news:
506500000008000000D3F10000-1079395200000@exchange.ni.com...
> Hi.
> I want to hide and display a message on my Panel.
> I started whith a text message initialy hiden and now I want to
> display it. On my aplication I need to hide it again therefore I need
> a function to do that.
>
> Thanks.
0 Kudos
Message 2 of 4
(3,275 Views)
The usual way to obtain it is to use
SetCtrlAttribute (panel, control, ATTR_VISIBLE, 0);
to hide the message and
SetCtrlAttribute (panel, control, ATTR_VISIBLE, 1);
to show it.

Another way to do this is to create the text message and place elsewere on the panel formatting it as desired, next create a square flat button (located on toggle button's palette) and make him the same size and position of the text message, arranging the toggle on top of the message. Next set the TRUE color of the toggle to transparent and set the control as indicator.

To display the message simply use
SetCtrlVal (panel, togglecontrol, 1);
and to hide it use
SetCtrlVal (panel, togglecontrol, 0);
The advantage of this method is that on the panel the message area rem
ains visible (outlined) which can be aestetically good (it depends on your personal taste).

Hope this helps
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?
Message 3 of 4
(3,275 Views)
Oupsss...
Sorry, I've read display and hide panel....

Yvan

--



******************************
YBDesign
Yvan BOURNE
Tel : 04.92.75.82.81
Fax : 04.92.75.82.82
Portable : 06.88.08.27.42
http://www.ybdesign.fr
******************************



"Roberto Bozzolo" a écrit dans le message de news:
506500000005000000D1C40100-1079395200000@exchange.ni.com...
> The usual way to obtain it is to use
> SetCtrlAttribute (panel, control, ATTR_VISIBLE, 0);
> to hide the message and
> SetCtrlAttribute (panel, control, ATTR_VISIBLE, 1);
> to show it.
>
> Another way to do this is to create the text message and place
> elsewere on the panel formatting it as desired, next create a square
> flat button (located on toggle button's palette) and make
him the same
> size and position of the text message, arranging the toggle on top of
> the message. Next set the TRUE color of the toggle to transparent and
> set the control as indicator.
>
> To display the message simply use
> SetCtrlVal (panel, togglecontrol, 1);
> and to hide it use
> SetCtrlVal (panel, togglecontrol, 0);
> The advantage of this method is that on the panel the message area
> remains visible (outlined) which can be aestetically good (it depends
> on your personal taste).
>
> Hope this helps
> Roberto
0 Kudos
Message 4 of 4
(3,275 Views)