LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Change command button appearance?

Is it possible to change the appearance of a control, such as a command button.  I am using classic command buttons to emulate an existing gui probably produced with some kind of Java GUI builder.  I need command buttons with a wider, more pronounced bevel, than is available in CVI.
 
Or are there other buttons that can be installed into CVI to do what I need?
0 Kudos
Message 1 of 5
(3,427 Views)
Hi hendra,

There are a few different options you can try:
  1. Use a picture command button and set the background to the texture of your Java control (screenshot?).
  2. Change the attributes of your button using SetCtrlAttribute. Possible attributes of interest include but are not limited to:
    1. ATTR_BORDER_VISIBLE
    2. ATTR_FRAME_VISIBLE
    3. ATTR_EDGE_STYLE
  3. Create a custom control that behaves similar to the one described above if you need to reuse it a lot.
  4. Use a ActiveX control that looks similar to your Java control.
Regards,
0 Kudos
Message 2 of 5
(3,382 Views)
According to CVI 8.1 Help, ATTR_EDGE_STYLE is not available for buttons.
 
Are there ActiveX controls available someplace to import?
 
How does a person create an ActiveX control?
0 Kudos
Message 3 of 5
(3,376 Views)
Hi Hendra,

Excuse me for the red herring - I only took a cursory glance and the various attributes available.

The short answer to your question about the ActiveX controls is no, there are no controls that we (National Instruments) provide that look like Java buttons. From wikipedia: "ActiveX is Microsoft technology used for developing reusable object oriented software components" (see full article here).

To that end, you should know that we do sell a product called Measurement Studio for Visual Studio 6.0, 2003, and 2005. Measurement Studio 6.0 (for VS 6.0) does include a set of custom ActiveX controls targeted towards test and measurement applications (graphs, knobs, numeric inputs, etc.), but again, none of these fit the description of what you are looking for.

In order to develop your own ActiveX controls, you would need to develop a project written in VS 6.0 since VS 2003 and later moved to the .NET framework. Furthermore,  you should know that Microsoft has made public their intentions to drop support for ActiveX in future versions of Windows, possibly including Windows Vista at some point.

In all honesty, I would probably lean towards the Picture Command Button for ease of implementation.

Regards,
0 Kudos
Message 4 of 5
(3,354 Views)
James,
 
Thanks for the more detailed information.  Sounds like using drawing images for the button is the way to go.  I'm going to use what CVI gives me until the customer says he has to have something different.
 
Regards... Gary
0 Kudos
Message 5 of 5
(3,338 Views)