From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-12-2011 06:00 AM
I may need a software function of 'Right click and create new device on front panel'.
Just after right click the menu pop up, then select 'create new device', then new device appear, by moving the mouse, can put the device wherever you want.
May I know how to implement this, thanks.
03-12-2011 12:54 PM
What do you mean by "new device"?
03-13-2011 10:26 AM
Please see the attached drawing
03-13-2011 01:49 PM
That image tells nothing. You can use a menu item, combo box, ring. etc. to list items that you can select from. What do you want to use? Do you not understand how to programatically populate it?
03-13-2011 03:20 PM
The part about "moving the mouse, can put the device wherever you want" makes me wonder if they are thinking "Controls on the fly"
03-14-2011 09:33 AM
Please see the attached screen, after click the 'New Device', there will been a frame following the mouse, wherever left
click the mouse it will place a frame in the front panel as the attached the other screen.
03-14-2011 09:46 AM
Do you mean that you wish the user to be able to draw new controls onto the front panel, in much the same way that you would draw a rectangle in a drawing package like paint? What would the control be used for?
Ravens Fan, your link seems to be broken.. did you mean this?
Ian
03-14-2011 11:11 AM
Yes, Ian. That's the one. I don't know how I got that link messed up. Maybe I didn't clear out the box completely when I pasted in the link data.
03-15-2011 01:32 AM
Yes, almost like that, it will be used to display some temperature node.
03-15-2011 02:33 AM - edited 03-15-2011 02:36 AM
If you want to make a conrol on the FP in runtime, you can do that by using a vi, then using SETLayeredAttributes WindowsAPI (just in case you want to remove that FP layer to make a free-hanging control, then you can use GetWindowLong and SetParent Windows API to make that control VI the child of your FP. In case you want to move this control, you can use the SendMessage() API to move it on an event (Say double click of mouse control). In case you want to resize the control in runtime, you can do that too.
Is this what you were looking for?
Also check the attached VIs and link for the SETLayeredAttributes API, they might help.
http://decibel.ni.com/content/docs/DOC-15177 - Will explain SetLayeredAttributes function
FraggerFox!