Dynamicly created dialog controls

I am looking for a way to make a resizable dialog panel that is configured at runtime based on the number of units that may be tested at once. I have attached code that is a solution that I do not like as I have to create the most possible sub panel’s controls a head of time. This example has 12 but we may need up to 80. I am looking for a way to create as many sub panels as needed dynamically.
To look at the sample code unzip to a folder and run "Harris Dialog Test VI Sample.vi" the number of panels must be less than 12 and be sure to use the stop button to end as that vi closes all the other vi running. Any help would be appreciated.
Terrill
Attachments:
Sample Dialog.zip ‏99 KB

Ah Ah !
It look like you found the only FP Object that can not be created by this method.
But again, there is another way
This one used a scripting primitive that was exposed in LV 7.0.
See the attached code
Note: NI does NOT support scripting at that time, so if you have any issue whatsoever with it, you are on your own.
PJM
Got EasyXML?
JKI.VIPM.EasyXML.OpenG.LAVA.Builder.blog
Attachments:
Subpanel Dynamic Instanciation.llb ‏48 KB

Similar Messages

  • How to dynamically create sqlldr control file using stored procedure

    I am trying to dynamically create the control file (.ctl) and execute the same using a stored procedure.I would be passing the file name as a parameter to this procedure. How do I go about doing this?
    The control file has the following structure. The file name (mktg) varies and is passed as an input to the stored procedure.
    SPOOL mktg.ctl
    LOAD DATA
    INFILE 'mktg.csv'
    INTO TABLE staging
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (COMPANY_NAME,
    ADDRESS,
    CITY,
    STATE,
    ZIP)
    SPOOL OFF ;
    sqlldr scott/tiger CONTROL= mktg.ctl LOG=mktg.log BAD=mktg.bad

    We are using oracle 9i rel 2.
    I have not had much success with the creation of log and bad files using external tables when they are being used within a dynamic sql.
    Plz check this:
    Re: problems related to data loads from excel, CSV files into an oracle 9i db

  • Dynamically Create Dialogs?

    I am trying to figure out a way to dynamically create a dialog box... essentially I would like a dialog with a row for each item in an array...
    However, I am kind of stuck with the Lua syntax for doing this.. any ideas?
    my skeleton dialog is something like this --  this successfully creates a dialog with one row, but I can't figure out how to loop this so it would build multiple rows based on the number of iterations in the loop...
    local f = LrView.osFactory()
    local myRow = f:row {
         spacing = f:label_spacing(),
         f:edit_field {
              fill_horizonal = 1,
              width_in_chars = 25,
              value = 'test',
         f:push_button {
              width = 50,
              title = 'Up',
              enabled = true,
         f:push_button {
         width = 50,
         title = 'Down',
         enabled = true,
    -- set up the column ---------------------------------
    local contents = f:column {
         spacing = f:control_spacing(),
         fill = 1,
         myRow

    Thanks for the reply. This seems to work.. sort of... doing it this was displays the correct number of rows, however, they are not spaced very nicely. I am guessing this is due to lack of the spacing = f:control_spacing(), fill = 1, lines that were originally in the f:column. However, I can't figure out where to put those now that I am doing f:column(myRows). What am I missing here?
    -m
    local f = LrView.osFactory()
    local myRows = {}
    -- set up a rows -------------------------------------
    for i=0, 6 do
         myRows[i] = f:row {
                        spacing = f:label_spacing(),
                        f:edit_field {
                        fill_horizonal = 1,
                        width_in_chars = 25,
                        value = 'ceremony',
                        f:push_button {
                        width = 50,
                        title = 'Up',
                        enabled = true,
                        f:push_button {
                        width = 50,
                        title = 'Down',
                        enabled = true,
    end
    -- set up the column ---------------------------------
    local contents = f:column( myRows )
    -- show the dialog box
    local result = LrDialogs.presentModalDialog(
    title = "Categories",
    contents = contents,

  • Is it possible to create Table Controls(in Dynpro) dynamically

    HI All
    I am not sure if we can create screen elements dynamically especially Table Controls. I need to create a Table control in a custom screen but the fields/columns in the table control are known at run time. Is it possible?? Appreciate any light on this subject.
    Thanks
    Van

    hi
    ccheck for the link
    Check following link for the same.
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D52%26threadID%3D45079%26messageID%3D459011%23459011
    also take a look at the FM
    take a look at FM:
    FREE_SELECTIONS_INIT
    FREE_SELECTIONS_DIALOG
    hope will be helpfull to you.
    regards
    vijay
    <u><b>plz reward pts if helpful</b></u>

  • Bringing dynamically created controls into scope

    Normally I can bring controls into scope in a function with
    the line
    var myControl = myControl;
    where myControl is the name of the control.
    If I dynamically create controls (called say cbx1, cbx7 etc.
    where the
    numbers are all different, but not necessarily contiguous)
    and save
    their names in myArray, then myArray[0] will contain the name
    of one of
    my new controls.
    How can I bring this control into scope in my function?
    And is there a way to create, read and change variable
    variables in
    ActionScript?
    Doug

    create an array within your function that's local to your
    function, if that's what you want. what's the purpose,
    though?

  • Is it possible to creat Table Controls(Dynpro) dynamically

    HI All
    I am not sure if we can create screen elements dynamically especially Table Controls. I need to create a Table control in a custom screen but the fields/columns in the table control are known at run time. Is it possible?? Appreciate any light on this subject.
    Thanks
    Van

    hi
    ccheck for the link
    Check following link for the same.
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D52%26threadID%3D45079%26messageID%3D459011%23459011
    also take a look at the FM
    take a look at FM:
    FREE_SELECTIONS_INIT
    FREE_SELECTIONS_DIALOG
    hope will be helpfull to you.
    regards
    vijay
    <u><b>plz reward pts if helpful</b></u>

  • Creating Custom Control on screen dynamically

    Hi All,
    Is it possible to create custom controls dynamically through ABAP code.
    If not, can we change the size of custom control at run time through ABAP code.
    Thanks
    Satya Priya

    Hi,
    Please ellaborate your Query...
    if ur taking abt Custom Control in Reporting , Module Pool than it is possible using Events.
    Affable
    Arbind

  • AutoScrolling of PanelLayout and setting Location of dynamically created controls

    Hi, I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up.
    So basically I have wrote a code that lets me drag on control over other other and replace their's locations.
    So I wanted to add possibility for user to dynamically add new controls (every new control is suppose to be 200px below previous) - everything is fine as long as I add them from upper section of my LayoutPanel (without scrolling) but when I try to add
    them while I'm half dawn scrolled they are placed based on CURRENT left upper corner which is NOT a upper left corner of LayoutPanel therfore they are placed with wrong padding based on current scrolled position.
    So my question is how can I avoid it and always add new controls based on LayoutPanel upper left corner? (I have already tried disabling AutoScroll while adding new control and enabling it back after adding - it works but I want to find PROPER way because
    I'm sure there must be some kind of solution to it)
    Thanks in advance.

    Hi darekg11,
    >> I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up
    I am wondering what the PanelLayout was, was it a “flowLayoutPanel” or “tableLayoutPanel”?
    >> basically I have wrote a code that lets me drag on control over other other and replace their's locations
    Did you mean you drag the control at runtime or at design time?
    >> how can I avoid it and always add new controls based on LayoutPanel upper left corner
    I could not reproduce your issue, and could you share us some key code or a simple demo to reproduce your issue?
    I made a research about “scrolling panel”, and I think the link below might be useful to you:
    # Scrolling Panel
    http://www.codeproject.com/Articles/226381/Scrolling-Panel
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Screen Personas: Create or control button visibility dynamically

    Hi,
    In Screen Personas, would it be possible to do the following with use of scripting functionality,
    1. Dynamically create controls e.g. buttons and assign actions to them
    2. Control Field Visibility( for GUI fields or Persona fields) at runtime
    Regards,
    Jeron

    Hi Tobias,
    Thanks for clarifying. We are currently evaluating Screen Personas for use in SAP DMS.
    Scenario we are trying to simplify is the workflow process in DMS. A DIR(Document) in DMS, has a status field with various values such as
    1. Initial Draft
    2. Submit for Approval
    3. Approved
    4. Rejected
    5. Archive
    6. Retire etc...
    Users, have to pick right status values from an F4 pop-up to pass document along the business process. This is not very intuitive and we would like to provide buttons on screen corresponding to each valid status that can be selected at that point in time. When a button is selected say, "Approve" or "Reject" the corresponding status value should be filled up in the standard status(hidden) field.
    We have numerous doc types and too many status values. Hence, the static approach of defining buttons in Personas does not scale up and is not support friendly.
    I hope i have been able to explain the scenario correctly. If required, i am open to having a call and can elaborate this in detail.
    Regards,
    Jeron

  • Dynamically Create (and reference) Dialog Window Groups

    I'm trying to setup a dialog window that can be easily added to via a CSV file.  The only problem I've run into is; I'm not quite sure how to create the groups dynamically.  Basically, the script setups up a bunch of texture features and then gives the option to save and/or strip that feature.  Below is the basic idea of what I'm trying to do, but the groups are not able to be created in the way that they are shown:
    featArray = [];
    featArray[0] = new Array("Feature Display Name","feature sub-group",'texture',"feature action",'feature type');
    featArray[1] = new Array("Feature2 Display Name","feature2 sub-group",'texture',"feature2 action",'feature2 type'); //etc.
    for(var z in featArray) {
        if(featArray[z][2] == 'texture') {
            w.p1.sp1.add('statictext',undefined,featArray[z][0]);
            w.p1.sp1.g[z] = w.p1.sp1.add('group');
            w.p1.sp1.g[z].orientation = 'row';
            w.p1.sp1.g[z].add('checkbox',undefined,'Save');
            w.p1.sp1.g[z].add('checkbox',undefined,'Strip');
            w.p1.sp1.g[z].children[0].id = featArray[z][0].toLowerCase() + "-save";
            w.p1.sp1.g[z].children[1].id = featArray[z][0].toLowerCase() + "-strip";
    If you change the g[z] to g1, it will create each field correctly (visually), but there is no way to properly reference the check boxes to see which are checked.  Any ideas how, or even if, it is possible to dynamically create a different group for each line of the featArray?  And if so, how to then reference the check boxes in those groups later on?  Thanks in advance for any help!

    You just use the array ie:
    featArray = [];
    featArray[0] = new Array("Feature Display Name","feature sub-group",'texture','feature group','feature type');
    featArray[1] = new Array("Feature Display Name2","feature sub-group2",'texture','feature group2','feature type2'); //etc.
    var w = new Window('dialog','test');
    w.p1= w.add("panel", undefined, undefined, {borderStyle:"black"});
    var x = new Array();
    var count =0;
    for(var z in featArray) {
        if(featArray[z][2] == 'texture') {
            w.p1.add('statictext',undefined,featArray[z][0]);
    w.p1.g = w.p1.add('group');
    w.p1.g.orientation = 'row';
    x[count] = w.p1.g.add('checkbox',undefined,'Save');
    count++;
    x[count] = w.p1.g.add('checkbox',undefined,'Strip');
    count++
    x[0].onClick=function(){
        alert("Checkbox 0 clicked");
    x[1].onClick=function(){
        alert("Checkbox 1 clicked");
    x[2].onClick=function(){
        alert("Checkbox 2 clicked");
    x[3].onClick=function(){
        alert("Checkbox 3 clicked");
    w.test = w.add('button',undefined,'Press to Test');
    w.add('button',undefined,'Cancel');
    w.test.onClick=function(){
    for(var w =0;w<x.length;w++){
        alert("Checkbox " + w + " value = " +x[w].value);
    w.center();
    w.show();

  • How do I receive notification of a change in the value of a dynamically created user interface object?

    I need to know when the user has changed the value of a slider or a Boolean control that was dynamically created (not part of a dialog). Is there any way to do that without polling? I would have expected these controls to post a WM_NOTIFY message to the parent window in response to user events, but that does not seem to happen. Am I missing something?

    Win32 controls do typically post WM_NOTIFY messages to the parent window for user events. The Measurement Studio UI controls are actually ActiveX controls, though, and events are handled differently for ActiveX controls.
    If you have a resource ID for you control, the easiest way would be to create your control in the OnInitDialog method and handle the event the same way you would if you had added the control to the dialog at design-time:
    Add a declaration for the event handler in the AFX_MSG block in the dialog header file.
    Make sure the AFX_MSG block in the header file includes DECLARE_EVENTSINK_MAP()
    Include an ON_EVENT entry for the event in the dialog source's BEGIN_EVENT_SINK_MAP block.
    Include a DDX_Control entry
    in the dialog source's AFX_DATA_MAP block.
    Otherwise, you'll have to dynamically sink the event at runtime after you've created the control. Microsoft's Knowledge Base has a couple of good articles that demonstrate how to do this:
    SAMPLE: AtlEvnt.exe Creates ATL Sinks Using IDispEventImpl (Q194179)
    AtlSink Uses ATL to Create a Dispinterface Sink (Q181277)
    - Elton

  • Creating CWDIO controls programmatically

    I have two test fixtures that have different devices on them but I want to transfer my code back and forth when I can. Fixture A has a device 5 and fixture B doesn't. Once I use the property pages to set up the CWDIO control and give it a member variable all the calls to that member varaible work great. If the member variable is m_dio then m_dio.SetDevice(3) for example works great.
    What I want to do though is only have device 5 on one station so I don't have to delete the control when I go from Fixture A to Fixture B. Right now I just change my #define FIXA to #define FIXB and recompile to switch fixtures. Well, everything works except for device 5 which is on FIXA and not FIXB. Well, the solution seems to be just don't
    have a device 5 and only create one for use on FIXA.
    I have the following in my .h.
    CCWDIO m_diocontrol;
    then in my *.cpp OnInit() I have:
    m_diocontrol.SetDevice(5);
    when I call
    device = m_diocontrol.GetDevice();
    device equals like 0x10003 or something and changes around which seems like it must not be getting assigned at all.
    I have all the instruments working through MAX and like I mentioned before if I use the property pages of a dialog control I don't have a problem.
    So, all this so I don't have to delete the control or recreate it each time I go between fixtures. Seems like I should be able to do it though.
    Should I be trying more of a dynamic approach? I'm sure you can tell by my syntax that I'm more of a test engineer then a programmer. I appreciate your input.
    Grant
    ps. I should mention that device 5 is another PCI-6503 card. FIXA has 2 PCI-6503 cards and FIXB only has one so no device 5 for him. Since both have at least one PCI-6503
    though all the files are installed for digital I/O.
    Grant M. Johnson
    Project Engineer
    LECO Corporation

    It sounds like that the control may not be getting completely initialized - are you doing anything else to initialize the control beyond calling the constructor? Specifically, I think that you need to call Create. For more information and an example of how to do this, see the Developer Zone article Embedding a Dynamically Created Licensed Measurement Studio ActiveX Control in a Visual C++ Dialog .... This article discusses dynamically creating a graph control, but I
    think the same ideas apply to dynamically create a DAQ control.
    - Elton

  • How to create a control and add it to a page layput

    I am reading the following link :-
    http://www.itidea.nl/index.php/what-about-you-must-fill-out-all-required-properties-before-completing-this-action-when-publishing-a-page/
    which says that i need to create a control and add it to a page layout. but can anyone help me in understanding how i can create a user control and add them to page layout ?
    Thanks

    > First problem  i could not find a User Control (Farm Solution only) under the Office/SharePoint section
    if you mean New item in Visual Studio, then check it under general Web category. User controls are basic ASP.Net functionalities, not Sharepoint-specific. If it is not there, you may use the following trick:
    1. Create new project in other VS instance using "ASP.Net Empty Web Application" template
    2. Add new user control there (in this project type it should exist for sure under Web category. Called "Web User Control")
    3. Copy all user control's files to the folder of your Sharepoint project (ascx, ascx.cs, ascx.designer.cs)
    4. In VS instance with Sharepoint project add existing items: all copied user control files. They should be grouped under ascx file automatically after that
    > The type or namespace name 'TaxonomyFieldControl' could not be found (are you missing a using directive or an assembly reference?)"
    you need to add reference to Microsoft.SharePoint.Taxonomy.dll assembly, which is located in the GAC (assume that you have installed Sharepoint on your dev env)
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com
    thanks a lot for your help. so can i do the following steps:-
    I follow these steps to deploy a user control.
    using Visual Studio 2012 , i added a new Farm solution.
    then inside the farm solution i added a new User Control(Farm Solution Only).
      3.   inside the user control i entered the following code:-
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Taxonomy;
    using Microsoft.SharePoint.WebControls;
    using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    namespace WikiPopUp.ControlTemplates.WikiPopUp
    [ToolboxData("<{0}:CustomValidationRequiredFieldsOnPage runat=server></{0}:CustomValidationRequiredFieldsOnPage>")]
    public class CustomValidationRequiredFieldsOnPage : WebControl
    protected override void CreateChildControls()
    base.CreateChildControls();
    if (SPContext.Current.FormContext.FormMode == SPControlMode.Edit)
    bool arethere = AreThereAnyMissingRequiredFieldsOnPage();
    if (arethere)
    //SPPageStateControl:
    //Provides an ASP.NET control that handles the Ribbon buttons controlling the state of a Microsoft SharePoint Server wiki or publishing page,
    //such as the CheckInCheckOutButton or the PublishingButton.
    SPPageStateControl baseParentStateControl = Page.Items[typeof(SPPageStateControl)] as SPPageStateControl;
    //Publish button: SPListItem MissingRequiredFields checks this.FieldHasValue(link.Name, field);
    //the field is empty (which is right) when the page is first created (MMD field is never filled in)
    //when the field was once filled, saved and emptied the field in sp code still has the previous value and the check MissingRequiredFields succeeds
    //after succeeding this check the page is validated (this.Page.Validate()) and this one fails which results SP validating the page as the Save button does
    if (baseParentStateControl.HasError)
    //this overwrites the previous PageErrorState
    //and validates the page
    //no popup anymore and status updates in yellow area
    baseParentStateControl.EnsureItemSavedIfEditMode(false);
    else
    //there are missing fields at this listitem, but they're not on the page
    //do nothing here, because the SerializedErrorState contains the navigate url to the Edit Properties page
    //and a message pops up
    /// <summary>
    /// Check if required fields are missing which are present at the page
    /// </summary>
    /// <returns></returns>
    private static bool AreThereAnyMissingRequiredFieldsOnPage()
    foreach (Control control in SPContext.Current.FormContext.FieldControlCollection)
    //get the control type
    string type = control.GetType().Name;
    FieldTypes controlType = (FieldTypes)Enum.Parse(typeof(FieldTypes), type);
    switch (controlType)
    case FieldTypes.TaxonomyFieldControl:
    TaxonomyFieldControl tfc = control as TaxonomyFieldControl;
    if (!tfc.IsValid)
    return true;
    break;
    default:
    break;
    return false;
    enum FieldTypes
    DateTimeField, FieldValue, TextField, RichImageField, NoteField, RichHtmlField, PublishingScheduleFieldControl, TaxonomyFieldControl, BooleanField, ComputedField
      4. i add a reference for the Sharepoint.taxnomy
      5. then i deploy the solution to my site collection. and now i can see the new solution inside the farm solution under central administration.
    but not sure if these are all the required steps to register the user control or still i need to do extra steps ?

  • How to create Dialog Module[Screen,Menu,object navigator]

    Dear All,
                kindly give me. How to create Dialog Module[Object Navigator,Screen,Menu,] steps with code.

    please see this  link   it is with  screen shot from the scrach ...
    <b>creating  struture 
    creating screen
    writing logic 
    table control
    creating tcode</b>  ...etc
    <a href="http://">http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm</a>
    reward  points if it is usefull ...
    Girish

  • Are plugins able to create graphical controls children to the Acrobat/Reader application?

    Hello,
    in the documentation I read 
      Acrobat Viewer layer 
    The Acrobat Viewer (AV) layer enables plug-ins to control Acrobat and modify its user interface. Using AV methods, you can, for example, add menus and menu commands, add buttons to toolbars, open and close files, display simple dialog boxes, and perform many other application-level tasks.
    I ask if it is possible that a plugin creates a graphical control like others applications can usually do and put it as a legitimate child of the Acrobat/Reader application, for example over a pdf page, and get events and so on.
    Thanks in advance

    Sure.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Wed, 26 Oct 2011 03:33:53 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: are plugins able to create graphical controls children to the Acrobat/Reader application?
    are plugins able to create graphical controls children to the Acrobat/Reader application?
    created by DevAcro<http://forums.adobe.com/people/DevAcro> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3990771#3990771

Maybe you are looking for