LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I a clickable button add to table?

Hi Guys!

I want add to a table control a clickable button or toogle button in a particular row,colunms?

Does anyone know a solution?

thx Mayda Martinez


Ing. Mayda Martínez Prince
- Software Entwicklung / Elektronik -
pro-micron GmbH & Co. KG modular systems
Innovapark 20
D-87600 Kaufbeuren

Tel.: +49(0)8341 9164-23
Fax: +49(0)8341 9164-20
mailto: mayda.martinez@pro-micron.de

http://www.pro-micron.de
0 Kudos
Message 1 of 5
(3,554 Views)

Hello Mayda,

which version of CVI are you working with? In CVI8 this is a built-in feature.

0 Kudos
Message 2 of 5
(3,544 Views)
Hallo Win S,

I work with LabWindows/CVI 7.1. Do you know a solution with it?

Best regards Mayda
Ing. Mayda Martínez Prince
- Software Entwicklung / Elektronik -
pro-micron GmbH & Co. KG modular systems
Innovapark 20
D-87600 Kaufbeuren

Tel.: +49(0)8341 9164-23
Fax: +49(0)8341 9164-20
mailto: mayda.martinez@pro-micron.de

http://www.pro-micron.de
0 Kudos
Message 3 of 5
(3,525 Views)

Hello Mayda,

the only thing I can think of is using a picture that looks like a button. Then, when the callback function of the table is called with the EVENT_LEFT_CLICK event, use the GetTableCellFromPoint function to check if the "button" is clicked.

If you want to make it look more realistic, use two pictures. One picture for the regular button, and another one that looks like that button being pressed. If the tablecell is clicked, display the "pressed button" picture until the user releases the mouse button (use GetGlobalMouseState or GetRelativeMouseState in a while-loop to check this).

Maybe someone else has a better idea...?

Success,

Wim

0 Kudos
Message 4 of 5
(3,520 Views)
Hello Mayda (& Wim).

When I wanted to include a prominent status indicator in a table, I overlaid a column of LEDs, each the same size as the table cell, and set the tab order to increase from top to bottom (this helps to match the button to the table row in the button's callback).

Possibly, you could do something similar, but using command buttons in place of LEDs; I would suggest turning button auto-sizing OFF.

See the "Check" column in the attached jpg.

Regards,
Colin.

Message Edited by cdk52 on 02-08-2007 05:39 AM

Message Edited by cdk52 on 02-08-2007 05:46 AM

0 Kudos
Message 5 of 5
(3,506 Views)