How can I programaticly edit a panel?

I have a panel that contains a number of buttons.
The number of buttons and the text in the buttons are supposed to change during the program execution.
I know how to create the buttons on the fly using NewCtrl, but have problems erasing/modifying excisting buttons.
Is there a way to get access to the list of Ctrl objects in a panel, investigate the Ctrl objects and erase or modify the Ctrl?
At the moment I am using  DiscardCtrl, but this requires me to keep track of the Ctrl objects.
Mistakes in mainting this information are hard to debug. It would be far simpler if I could access the information that the application maintains.
Solved!
Go to Solution.

A magic rule in CVI is that everything you can do in the UIR editor can be done programmatically ar runtime: you only have to know the right way to do it! So:
Deleting a control: DiscardCtrl () (you already discovered it)
Editing control aspect: almost all operations are done with SetCtrlAttribute with the appropriate attribute.
Obtaining the list of controls can be done this way:
GetCtrlAttribute (panelHandle, ATTR_FIRST_CTRL, &ctrlID);
while (ctrlID) {
   // operate on the control
   // Get next control: 0 if the last control in the panel is found
   GetCtrlAttribute (panelHandle, ctrlID,  ATTR_NEXT_CTRL, &ctrlID)
While scanning the controls in a panel you can retrieve details on the control by using
GetCtrlAttribute (panelHandle, ctrlID, ATTR_CTRL_STYLE, &style);
The list of control styles (buttons, rings...) can be found in userint.h
As an example, attached is a function I developed that:
- scans all controls in a panel
- switches all operable controls between indicator or hot
- skipping controls in a variable-list of arguments
To call this function to set all control as hot:
SetParamPanel (panelHandle, 1, VAL_HOT, 0);
To set all controls as indicator except quit button:
SetParamPanel (panelHandle, 0, VAL_HOT, PANEL_QUIT, 0)
Hope this helps.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?
Attachments:
SetParamPanel.txt ‏4 KB

Similar Messages

  • How can I programaticly change settings on a FP-PG-522

    How can I programaticly change settings on a FP-PG-522 using Measurement
    Studio
    for Visual Basic and an FP-1000 module?
    Is there a Measurement Studio for VisualBasic DAQ control to do this?

    I am either in the wrong location or have a different layout than you.
    Apple button > system preferences > keyboard and mouse > mouse tab > then all I have are the options to change the tracking speed, scrolling speed, double-click speed, and which button is required to zoom with the scroll wheel. The only drop-down menu I have on this screen is to select which button + scroll wheel allows me to zoom.
    I am using version 10.5.6. Am I in the incorrect section of this forum?
    Message was edited by: Coop772

  • How can I programatically identify PDF files with embedded images?

    Our company has 27,266,949 .PDF files that we're planning to compress in order to save server space.
    We don't want to compress any of the .PDF files that have embedded images as to not alter the image's state.
    How can we programatically create a list to exclude from the compression process?

    Ah, see told you we were new to this and no, my taxs already have enough digits to the balance.
    Ok, so based on that, we should be able to use the preflighting tool to identify the PDF’s with images, factor them out, and then continue with lossless compression on the remaining balance.
    That will give us the compression we need to save space, but also allow us to stand in the court of law (if the scenario was to ever occur) and proclaim that none of our medical images have ever been altered by compression.
    Sound like a reasonable plan?

  • How can I display the front panel of the dinamically loaded VI on the cliente computer, the VI dinamically loaded contains files, I want to see the files that the server machine has, in the client machine

    I can successfully view and control a VI remotly. However, the remote VI dinamically loads another VI, this VI loaded dinamically is a VI that allows open others VIs, I want to see the files that contains the server machine, in the client machine, but the front panel of the dinamic VI appears only on the server and not on the client, How can I display the fron panel with the files of the server machine of the dinamically loaded VI on the client computer?
    Attachments:
    micliente.llb ‏183 KB
    miservidor.llb ‏186 KB
    rdsubvis.llb ‏214 KB

    I down loaded your files but could use some instructions on what needs run.
    It seems that you are so close yet so far. You need to get the data on the server machine over to the client. I generally do this by doing a call by reference (on the client machine) of a VI that is served by the server. THe VI that executes on the server should pass the data you want to diplay via one of its output terminals. You can simply wire from this terminal (back on the client again) to an indicator of your choosing.
    Now theorectically, I do not think that there is anything that prevents use from getting the control refnum of the actual indicator (on the server) of the indicator that has the data, and read its "Value" using a property node. I have never tried this idea but it seems t
    hat all of the parts are there. You will need to know the name of the VI that holds the data as well as the indicator's name. You will also have to serve all VI's. This is not a good idea.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • HT5177 How can two people edit the same FCPX file? One company, so both people/computers share the same license. Example: I work on revision A and my boss takes it and makes revision B and gives it back to me using two separate computers.

    How can two people edit the same FCPX file? One company, so both people/computers share the same license. Example: I work on revision A and my boss takes it and makes revision B and gives it back to me using two separate computers.

    Have the project, events and media on one drive which is common to both macs.
    You can download FCP X to both macs using the same Apple ID that it was purchased with.
    Andy

  • How can i quick edit Audio( increase bass) of a single file?

    Hi everyone,
    Im new to FCPX. I have a bunch of videos of music gigs ive played and would like to increase the bass (via equalizer) on most of them. All these videos are already converted into an "Apple Friendly" format and are sitting comfortably in my Itunes Video folder. How can i quickly increase the bass in each video (Without having to tediously export one by one) in FCPX and do a quick overwrite over the original video without having to make an EXTRA file?
    THanks

    ok.
    "Why don't you increase the bass with the equalizer in FCP? Do it to one clip and use paste attributes to apply it to other clips."
    1) How do i copy the attributes after making the changes??
    2) How do i paste the attributes onto the next file?
    Thanks.
    Re: How can i quick edit Audio( increase bass) of a single file? 

  • In Mail, How can I continue editing an email saved as a draft?

    In Mail, seems that once I save an email I've been working on to the Drafts folder, when I reopen it, I cannot continue editing it.
    In Mail, How can I continue editing an email saved as a draft to the drafts folder?
    Steve

    Came here to find the solution but eventually found one myself. You just simply double click on the e-mail you want to edit on the left pane, and it'll open a composing window.

  • How can our customer edit our Captivate 6 content with Captivate 5?

    Our company has decided to dive into the e-learning business and create e-learnings.  We just purchased a Captivate 6 subscription, unfortunately before finding out our customer uses Captivate 5.  He would like to edit our files once in a while when he needs to if he doesn't have enough time to have us do it.   Is there anyway he can edit content produced in Captivate 6 with his Captivate 5.  Can I export files of a certain type that he can in turn import and add to his Captivate 5 and edit himself?  In other words, what kind of files can I export from Captivate 6 than he can import with Captivate 5 and make small changes to?
      Vielen Dank,
                 Ryan

    Thank you.  I see that I can export content as an .xml file.  Isn’t this something he can upload with Captivate 5?    Thanks for bearing with my naivety. : )
    Von: RodWard [email protected]
    Gesendet: Mittwoch, 1. August 2012 14:25
    An: Scharfer, Ryan
    Betreff: How can our customer edit our Captivate 6 content with Captivate 5?
    Re: How can our customer edit our Captivate 6 content with Captivate 5?
    created by RodWard<http://forums.adobe.com/people/RodWard> in Adobe Captivate - View the full discussion<http://forums.adobe.com/message/4591371#4591371

  • HT4599 how can I see Icloud Control panel version?

    how can I see Icloud Control panel version?

    Yes, that's possible. Simply don't activate the option for storage and backup or PhotoStream. Just activate the calendar option if that's all you want to use.

  • I want to break up my hour long video in iMovie 11 into smaller 15 minute segements to upload to youtube. How can i put EDITED VIDEO in new projects in iMovie?

    I want to break up my hour long video in iMovie 11 into smaller 15 minute segements to upload to youtube. How can i put EDITED VIDEO in new projects in iMovie? (each 15 minute segment to iMovie)

    In iMovie's Project Library view (where all your projects are listed), click on the name of your project (don't double-click to open it, just single click to highlight it).
    From the Menu select File > Duplicate Project. A copy of your project will be placed in the Project Library. It will have the same name as the original, but with a number appended. You can rename it if desired - click on its name twice (not double-click) so that it is highlighted as light blue, then over-type it.
    Delete from the duplicate all the clips and other media (for example, photos, music and so forth) that you don't want included in the first of your 15 minute segments. In other words, delete all but the first 15 minutes.
    Continue creating duplicates of the original (and rename if necessary). Delete from each duplicate all the unrequired parts for each segment. So, for example, for the 2nd duplicate delete the first quarter (15 minutes) and the 3rd and 4th quarters.
    You should end up with 4 duplicates with separate names, each containing the required segment. You will also have kept intact the original one hour movie, which you may wish to use independently of YouTube (maybe for burning a DVD or playback through a Media Player).
    Note that duplicating the original project will not take up much extra space on your drive. Projects reference (link to) the associated Event (or Events) in the Event Library - they don't actually contain video as such. The project file also keeps track of titles, transitions, effects, music and so forth that you've added to the project.
    John
    Message was edited by: John Cogdell

  • How can I add "Edit with Photoshop CS5" to the Edit With options?

    How can I add "Edit with Photoshop CS5" to the Edit With options?

    I think it has something to do with the order in which the PSE and PS are installed on your machine.
    For me, I can see option for editing in photoshop both in edit menu and from the action bar. I probably had Photoshop installed on my system before PSE

  • How can I programatically modify a teststand sequence global in Labview ?

    Hello,
    I am automating some tasks using Labiew to modify data in a Teststand sequence file. How can I programatically modify the value of a Sequence Global from labview ?
    Thanks,
    Sam

    You have to pass in the TestStand variable RunState.ThisContext to the vi through the connector pane.  I'm not sure about the exact variable name because I don't have TestStand loaded at this time.  But  there is a variable for the sequence context in TestStand and this has to be passed to the vi.  Note that you cannot run the vi stand alone.  You must run it from TestStand in order to get the proper sequence context.
    - tbob
    Inventor of the WORM Global

  • How can I still edit my iWeb site on new iMac

    My mid 2007 24" iMac which has served me well has memory problems. I now work with much larger projects ( Logic Studio + video ) than earlier, and have to continually keep clearing the memory as I work. I have the maximum  4 GB RAM  ).
    This is halting progress so seriously that I'm considering changing it for a new iMac .... 27".
    My question is: How can I still edit my iWeb site on a new iMac, when iLife is no longer included, and so presumably OS 10.7 doesn't support iWeb ?
    Will be grateful for insights.
    Thanks,
    SeaDream.

    Well thanks. Sounds so complicated, though. Would another option be to backup my present Mac HD ( with Snow Leopard ) to an external HD and simply edit iWeb from there ?
    As long as I also backed up this external HD, would this be a possibility ?

  • How can a customer edit a web page that I have made?

    How can a customer edit a web page that I have made?  The customer should edit the text or pictures by himself. Is this possible? 

    First you can search in this forum "in browser editing".
    Second you may be interested in this video:
    http://tv.adobe.com/de/watch/designtools-in-der-creative-cloud/bearbeitung-im-browser-in-a dobe-muse/

  • How can I expand the source panel on the Import dialog window (mac LR3.3)?

    Hello,
    How can I expand the source panel to the right under the Import dialog window?
    I'm unable to drag the seperation line to the right and therefor unable to view folder names when in lower hirarchy...
    thanks you
    shlomit

    Shlomit Heymann wrote:
    shouldn't there be at least a scroling bar from left to right? How am I suppose to view my sub folders names?
    To a lesser extent, the same problems exists on all panels, whether they be in import window or elsewhere. Just look at the Folder panel in Library to see how much space is wasted in offsetting the subfolders. When this was pointed out to the relevant folk the reply came back that it was by design. Bad design, but we're pi...g into a head wind trying to get it changed.

Maybe you are looking for

  • Firefox won't load but stops responding right after I open it. its done this for two days on all our computers

    I use firfox all the time but yesterday and today it has decided that it will not load the page nor will it respond. it get a spinning blue circle and it will not allow you to click anything. you can escape it but nothing has done any good that I've

  • Image from database won't display in page region

    I’m having difficulty getting an image stored in the database to display in an HTMLDB page region. I’ve consulted the tutorial in Sergio’s Blog and looked for relevant threads in this forum but am still having problems. Any insights into where

  • XI Receiver Channel - Dynamic Logon Language

    Hello, Is there any way to define dynamically the logon language in XI Receiver Channel? Our cenario is an ECC -> PI -> ECC integration using XI sender and receiver channel. Depending on a specific element in message payload we want to define the cor

  • SVG Plug-in detection

    In a portion of our XSQL application, we display certain results as sets of numbers, and alternatively in bar-graph format using SVG. We would like our XSL to be able to detect whether the user has the SVG plug-in installed, specifically for IE 5+, s

  • HR data transfer across server

    Hi HR expert, I have question on HR data transfer from 1 server to other with different clients, let me know is it possible in SAP to transfer HR data of organizational management i.e. i am mainly consigned about data of HRP1000,HRP1001,PA0002 & PA01