Resize a control (i.e. String Control)

LV5.0
NT 4.0
Hello,
I would just like to know if there is a way to:
1) programmatically resize a control inside my VI program.
2) get the width & height of my VI panel.
Right now, im making my panel run into full screen size (size of desktop)
whenever it starts up, which in turns I want my one control to adjust also
it's position and size.
You don't have to answer both question so if you only know one, I would
greatly appreciate it.
TIA
John

Click here for Free Video!!
http://www.gohip.com/freevideo/
John Cruz wrote in message
news:[email protected]..
> LV5.0
> NT 4.0
>
> Hello,
>
> I would just like to know if there is a way to:
>
> 1) programmatically resize a control inside my VI program.
You have the answered youreself
>
> 2) get the width & height of my VI panel.
Use vi refference and and Property node, select Fron Panel Window>Panel
Bounds
>
> Right now, im making my panel run into full screen size (size of desktop)
> whenever it starts up, which in turns I want my one control to adjust also
> it's position and size.
>
> You don't have to answer both question so if you only know one, I would
> greatly appreciate i
t.
>
> TIA
> John
>
>
>
Esben

Similar Messages

  • Automatic resizing of controls on block diagram

    Hi,
    I have control as strict type def and many instances (on block diagram) of this control in several VIs. When I add new element in this control all instances resizes to maximum size and that corrupt layout on block diagram because all structures resizes with that instances. Is there a way to avoid that?
    Thanks, andrej

    Place it on the front panel of a subVI as an output. Then call that subVI whenever you want the typedef.
    You can find more on using typedefs here.
    Try to take over the world!

  • Dynamically resizing table control

    Hi all,
    I have designed a table control in the screen. in that, I have fixed the number of columns (7) using Fixed coulmns option in the screen painter. But, when the user selects an option (radio button) in the screen, I will hide two columns of the table control. So, now I want to resize the table control i.e. reduce the horizontal width of the table control.
    How can I achieve this?
    Please help me....
    Thanks,
    Rajan

    Hi,
    Suppose your screen is 9000
    Now in PBO define a module set_attr_table and handle
    handle it via your button -
    PROCESS BEFORE OUTPUT.
      MODULE status_9000.
      MODULE set_attr_table.
      LOOP AT  t_lips3 INTO w_lips3_ds WITH CONTROL
               t_inbd CURSOR t_inbd-top_line.
      ENDLOOP.
    Where if you have already defined
    CONTROLS: t_inbd       TYPE TABLEVIEW USING SCREEN '9000'.
    t_lips3 is the table you are using to display records from.      
    In the module set_attr_table try to change the the table control dynamically -
    DATA: w_ls_cer_inbd_ds  LIKE LINE OF t_inbd-cols.
    Try to modify the column attributes dynamically by modifying the screen table contents
    LOOP AT t_inbd-cols INTO w_ls_cer_inbd_ds.
          IF sy-tabix = 5 or sy-tabix = 6.
            w_ls_cer_inbd_ds-invisible = 1.
            MODIFY t_inbd-cols FROM w_ls_cer_inbd_ds TRANSPORTING invisible.
          ENDIF.
        ENDLOOP.
    Say column 5 and 6 you want to change.
    Thanks

  • Resizing tab controls

    Hi ,
    is there any way to resize controls on a tab that is attached to a splitter when operating splitter (the mode "splitter sizes control" is selected).
    Splitter only resizes tabs itself, not the controls on the tab. Some controls on the tab, for instance, are disappeared when splitter scale the tab down.
    thanks for any help.
    Solved!
    Go to Solution.

    > is there any way to resize controls on a tab that is attached to a
    > splitter when operating splitter (the mode "splitter sizes control" is
    > selected). Splitter only resizes tabs itself, not the controls on the
    > tab. Some controls on the tab, for instance, are disappeared when
    > splitter scale the tab down.   thanks for any help.
    Associate a panel to that tab with GetPanelHandleFromTabPage()
    Maybe that's enough for automatic resizes (which I don't use).
    Otherwise:
    Then give that panel a callback: SetPanelAttribute(Pnl,
    ATTR_CALLBACK_FUNCTION_POINTER, cbp_Something);
    Then within that function catch the EVENT_PANEL_SIZE event and do what you
    want.
    Guillaume Dargaud
    http://www.gdargaud.net/

  • Grouping and resizing screen controls

    The manual says this:
    To group screen controls:
    1 Select the screen controls you want to group together.
    2 Choose Group from the workspace Action menu (or press Command-Option-G).
    The screen controls are grouped. Moving one of the grouped controls moves the
    others, and resizing one of the grouped controls resizes the others.
    However, when I try that and then try to resize a group, only the control that I'm resizing actually resizes. Can someone else try this and then point me to the stupid thing that I'm missing?
    yes, all the controls (9 sliders, 8 buttons, 8 knobs) are "merged" before "grouping"
    Thanks,
    Stewart

    Make sure that you do not run Firefox in full screen mode (press F11 or Fn + F11 to toggle; Mac: command+Shift+F).<br />
    If you are in full screen mode then hover the mouse to the top to make the Navigation Toolbar and Tab bar appear.<br />
    You can click the Maximize button at the top right to leave full screen mode or right click empty space on a toolbar and use "Exit Full Screen Mode" or press F11.<br />

  • Auto resizing path control

    How can I resize (programatically) so that the whole path is visible in a path control (for a file selected at run time)?
    Thanks!

    You have to right click on the control and set the caption to visible (which I thought I eliminated by the first caption.visible step), otherwise labview doesn't create the caption for it, I guess.  And yes, the last one is Path Control.size.width.
    This works in 8.2.1.  Also, it extends to the right.
    edit - tst brought it to my attention that property nodes execute top to bottom, so you can combine the first three nodes.
    Message Edited by JeffOverton on 03-20-2008 12:29 PM
    =============
    XP SP2, LV 8.2
    CLAD
    Attachments:
    Example_VI_BD.png ‏3 KB

  • Resize numeric controls

    If I RIGHT CLICK on a Numeric COntrol and select 'Properties', the appearance tab show's the 'SIZE' as Height=23 & Width= 78. However, the Height is "grayed Out" and I cannot change it. I have investigated the "Custom" approach will does allow me to change the Font Size attribute, but the actual control still has the same 'height'.
    QUESTION:
    How can I change the height to a size that will allow me to use a 74pt font...a very large indicator.
    ...thanks everybody for the much anticipated reply.
    Solved!
    Go to Solution.

    Ciphertech,
    You cannot change the height of a numeric control or indicator directly.  Select the value displayed and then go to the font menu to select the size.  The indicator size will change to accomodate the font. If the exact size you want is not available on the menu, choose the closest available size and then use the Smaller or Larger keyboard shortcut to get what you want.
    Another way is to use the Numeric Text.Fontize property node.  Set it to the size you want.
    Lynn

  • How to add external images onto a control and still be able to resize

    Hello,
    I'm a LabVIEW newbie.  I'm trying to customize the appearance of my VIs, and one of the things I like to do is to import external image and paste it onto the faceplate of the gauge indicator.  I've followed the instruction in the Labview application note using the control editor and was able to paste the picture into indicator.  But when I use it in the front panel and resize the gauge indicator, the image (added as a decoration) doesn't resize together with the indicator.  My questions are:
    1. How to add external images onto a control/indicator and still be able to resize the image automatically when I resize the control/indicator?
    2. How to "add" a new part to an existing control/indicator?  It looks like I can only customize/modify the existing parts of the control/indicator in the control editor. 
    Any help is appreciated.  Thanks.

    1/ Do not use the image as an added decoration. Instead replace part of the control with the image. Tis is illustrated in the attached vi : the arrow was pasted as a decoration, and also used to replace the slide cursor. Changing the control size do not affect the decoration, but changes the cursor.
    2/ What do you mean by adding new parts to a control. We have just seen that it was possible to modify a control. Now, if you want to include additionnal functionnality, that's another story. You can replace parts of the control, and this can give interesting results.  You can edit a slide control, and replace the numeric indicator by another control, including a numeric indicator, that you can replace with etc...
    But there, it still the same info displayed under different forms. If you want to have several independant functions on the same control, such as a string display and a boolean and a numeric indicator, then that's a job for a cluster...
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Slide with Arrow.vi ‏13 KB

  • Labview resizing control.....

    Hello All,
    I am in the middle of developing an application that will be bundled with our product.  I have developed many such applications using visual studio, however this is my first adventure using Labview.
    As many of you know, one of the most common variables in distributing an application is the und-user screen resolution.  With the relatively recent explosion of differing screen resolutions and aspect ratios, making applications resolution independent is even more important than ever.  Along with this, giving the customer the ability to resize the appliction at will is a huge benefit.  On many occasions I have walked into a customer's site to see my application shrunk down to a corner of the window, where the use can still see it, almost like an indicator.
    For visual studio, I had purchased a third party control.  Plunk the control onto the window (it became invisible at run time) and all of the controls, fonts, etc resized as the screen was resized.  When visual studio went to .Net, this particular control no longer worked.  I had to evaluate 5 different controls to get one that even came close to working properly, and even then I had to work with support and beta test many versions of that control to get the bugs out. 
    Now I know that Labview has the panel resize options, etc and I have played around with them.  However, as most of you know, many problems still exist, such as the fonts not resizing, and multiple window changes cause control distortion, even when brought back to the same panel size.
    So, what I am wondering is this:  A) Does anyone make a control that I can purchase that does a good job in this regard, or B) if not, how about opening a discussion on how to implement a control to do just this?
    If I need to, as I forsee doing more applications with Labview, I could tackle this on my own, but as I am new to LV my learning curve may be steep so I'd like to draw on the abundance of talent and experience I've read on this board.
    I was thinking of a control that would enumerate all of the controls, labels, etc on the panel.  During the development cycle it would store all of the control / font sizes (internally? to a file?) as the developer intended the panel to appear.  At execution time (after it is built) each time the panel is resized, the control would set the height/widths and font sizes as needed.  Why store the development time sizes?  To eliminate the errors that creep up when sizing the panel up and down multiple times.  I assume this occurs in LV since original size is not tracked and pixel displacement is non-uniform across the pane, and the moving / scaling is non-integer in nature but gets applied to integer properties.  For example, when resizing from the lower right corner, to say half the width / height, controls in that corner move ALOT while controls in the Upper-left only move slightly, yet all controls are scaled in size the same amount.
    I would love it if someone could dope-slap me upside the head and say "just do this".  If not, what are some of the methods I should be looking at, and pitfalls to avoid?
    Thanks for your input!  

    tartan5 wrote:
    Wouldn't life be grand if every control included a set of read-only properties, say XOrigin, YOrigin, XSize, and YSize that were updated as you move the component around during development, but was fixed as you run the compiled program.  This would at least give you an absolute reference to use as you resize the panel, and eliminate the truncation errors we now see.
    You could do that using tags if that is what is needed.
    One interesting control I tested actually increased performance by grabbing an image of the window when the resize handle was moved, placing the image over the window, resizing the image as the corner was dragged.  Then when the corner was released, updated all of the controls / fonts as required, then hid the image.  It actually worked amazing well vs resizing the controls in real-time.......That might be very do-able in labview, show a picturebox, have it size to the window, etc....
    It probably would not be needed. You can just defer the panel updates until after you're done with your resizing. I was thinking the performance issue would be in going over all the controls and changing their size, but there is probably not going to be one.
    On another note, is it possible to recurse through an xcontrol and get all of the components at run time?  I have just finished developing my first xcontrol (so it's fresh on my mind) but I'm not sure how the xcontrol is viewed by the environment (ie if all the sub-components can be reference / obtained)?
    No idea. I use LV 7.0, which does not have them. My guess would be that you can't, at least in the earlier versions. Maybe the newer ones allow this, but I would doubt that. You might need to write a resize method (or ability or whatever they're called) for the control. That is one example of how writing a generic framework would be complicated.
    On your first point, are you suggesting that the resizer control would add the tags to each enumerated control itself?  That's almost as good as my wish above (LOL)....
    Well, I wouldn't call it a control. It would be a special resize handling (TM) process, but yes, that is exactly what I'm suggesting. See attached for a simple example.
    P.S. No, I don't know how to access these in LV 8.x.
    Try to take over the world!
    Attachments:
    Pos Tags.vi ‏36 KB

  • How can I hide a text label as I would a control or indicator?

    As I have multiple indicators that must have the same identifier to the operator I can not use the indicator label as the items identifier. At times I want to hide the indicator and label. How can I hide the label? Please recall a text label just sits on the front panel as desired. It isn't within a raised or lowered box. In the attached sample I would like to hide "MyLabel" when the date indicator is hidden.
    Attachments:
    Test_Label.vi ‏35 KB

    Here�s a way. Its a little involved, but it will work:
    1. Customize a control or indicator to remove the border (I used a string control)
    a. Right click on the control or indicator, go to �Advanced � Customize�
    b. Click on the wrench on the tool bar to enter edit mode
    c. Select the border and drag it off to the side
    d. Reduce the size of the border to a single pixel (it won�t let you delete it)
    e. Rubber band a box around the 1 pixel border to select it and use the cursor keys to move it within the �white space� of the string control. It will effectively disappear. You will NOT be able to move it with the mouse as LV will try to resize the border instead of moving it.
    f. Using the color tools �suck up� the background color of your vi and �paint� i
    t into the white space of the control.
    g. Make the control the correct size to hide your label(s). Make sure it is right as you will NOT be able to resize the control outside of the �customize� function (i.e.: while on your front panel)
    h. Click on the tweezers to go back to customize mode.
    i. Give your control a descriptive name
    j. Right click on the control, go to �Visible Items� and uncheck �label� to hide the label.
    k. Save your new control
    2. Back on your front panel, place your new control over what you want to hide and programmatically make it visible or invisible as desired.
    I have included a copy of your original vi, modified to hide and unhide your label. I have also included the customized string control that accomplishes this. You may resize the control as needed by �customizing it as described above.
    The only disadvantage to this method is that if you want to hide multiple labels they must be in the same area of the front panel. Otherwise you must have seve
    ral �hiding� controls.
    An advantage is that you will not have to make the original control or indicator (i.e.: the date indicator) visible or invisible as it can be hidden as well.
    Hope this does what you want.
    Good Luck.
    Attachments:
    Test_Label.vi ‏27 KB
    InvisibleString.ctl ‏6 KB

  • Regarding page down in the table control veritcally

    Hi all,
              I have an issue regarding page down in the Table control in module pool , i.e when i m click the vertical scroll bar and going for page down then , the control is flowing to the next sceen which is not needed , and it shuld just scroll down and up vetically.
    Can anyone help me how to handle the page down event ?
    Thanks & regards,
    satya

    Table Controls: Examples with Scrolling
    The following example processes a table control with LOOP without parallel loop using an internal table. In addition to the scroll bar, the user can also carry out program-controlled scrolling with function codes.
    REPORT demo_dynpro_tabcont_loop.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn,
          fill TYPE i.
          TABLES demo_conn.
    DATA: lines TYPE i,
          limit TYPE i.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      DESCRIBE TABLE itab LINES fill.
      flights-lines = fill.
    ENDMODULE.
    MODULE fill_table_control OUTPUT.
      READ TABLE itab INTO demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      lines = sy-loopc.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'NEXT_LINE'.
          flights-top_line = flights-top_line + 1.
          limit = fill - lines + 1.
          IF flights-top_line > limit.
            flights-top_line = limit.
          ENDIF.
        WHEN 'PREV_LINE'.
          flights-top_line = flights-top_line - 1.
          IF flights-top_line < 0.
            flights-top_line = 0.
          ENDIF.
        WHEN 'NEXT_PAGE'.
          flights-top_line = flights-top_line + lines.
          limit = fill - lines + 1.
          IF flights-top_line > limit.
            flights-top_line = limit.
          ENDIF.
        WHEN 'PREV_PAGE'.
          flights-top_line = flights-top_line - lines.
          IF flights-top_line < 0.
            flights-top_line = 0.
          ENDIF.
        WHEN 'LAST_PAGE'.
          flights-top_line =  fill - lines + 1.
        WHEN 'FIRST_PAGE'.
          flights-top_line = 0.
      ENDCASE.
    ENDMODULE.
    The layout of screen 100 is:
    A resizable table control called FLIGHTS is defined. The fields of the table control are transferred from the structure DEMO_CONN in the ABAP Dictionary. The first two columns are lead columns. The corresponding fields are output fields. A title bar, column headers, and a selection column are created. The component MARK of type character with length 1 from structure DEMO_CONN is assigned to the selection column. You can select one column and several lines.
    It has the following flow logic:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      LOOP WITH CONTROL flights.
        MODULE fill_table_control.
    ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      LOOP WITH CONTROL flights.
        MODULE read_table_control.
    ENDLOOP.
      MODULE user_command_0100.
    The system executes a loop at PBO and PAI using the table control FLIGHTS. During the PBO loop, a module is called to fill the table control from table ITAB of the ABAP program. During the PAI loop, a module is called to modify table ITAB.
    Before the PBO loop, in the module STATUS_0100 the current number of lines of the internal table ITAB is placed in component LINES of control structure FLIGHTS. This helps the system to correctly install the scroll bar of the table control.
    During the PBO loop, in the module FILL_TABLE_CONTROL the work area DEMO_CONN is filled with values from the internal table, where the row index corresponds to the current row of the table control.
    During the PAI loop, in the module READ_TABLE_CONTROL the current number of the loop SY-LOOPC in the table control is placed an auxiliary variable. The number is dependent on the size of the screen. The rows of the internal table, whose row index corresponds to the current row of the table control, are overwritten with the contents of the work area DEMO_CONN. User input is transferred from the input fields of the control to the internal table. In particular, the internal table also contains a flag in the column MARK to indicate whether the row of the table control is selected or not.
    After the PAI loop, user input is processed in the module USER_COMMAND. The GUI status SCREEN_100 provides the appropriate function codes. You can scroll line by line or page by page, or Goto the first or last page. You can implement scrolling by setting the component TOP_LINE of control structure FLIGHTS. For page-by-page scrolling the auxiliary variable that is filled in the PAI loop by SY-LOOPC is used as the step size.

  • Why would a control have the customize option dimmed out when it is right clicked?

    A numeric control in one of the examples has the customize option dimmed out when right clicked. Why would that be? Is there a way to get it into the control editor or saved as a control?

    Just to clarify my earlier statement:
    While customization was greyed out prior to LabVIEW 8.0 for items in the dialog (=system) palette, even LabVIEW 8.0+ does not allow much customization. For example if I try to customize the "System Numeric" control, the "wrench" is still greyed out and the only thing I can do is resize the control horizontally in the control editor.
    This is as expected!
    Dialog (system) controls inherit their visual appearance from the OS, and the same control will look different under Windows XP, Windows 2000, or MAC, etc. They adapt to the desktop theme, including fonts, font colors, and other colors, etc.. The attached Image shows the same pair of controls and how they change appearance if I switch the desktop theme between "Windows XP" and "Windows Classic".
    Customization would make no sense, because the appearance is determined by the OS, not by you.
    Message Edited by altenbach on 08-25-2006 02:19 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Theme.png ‏4 KB

  • Flexible custom control

    Hi all, I am developing ALV using OO concept in which custom container is placed on custom control, i have kept that custom control of full screen size but my requirement is to make custom control flexible dynamically while we are adjusting the size of main window.
    I used Resizing option while designing the layout, but still its not properly serving my purpose. Is there any other way to work with it?

    There is no direct option which will resize custom control/container when resizing window. The one you already set will prevent from making it too small. You may however, set custom control large enought (i.e fullscreen) but resize container inside it by using methods SET_HEIGHT and SET_WIDTH of cl_gui_custom_container .
    Regards
    Marcin

  • When creating a custom control, why is the picture item option removed?

    I customized a system boolean to add images for each of the 6 states (including mouse hover) by selecting the picture item from the list and importing the image from a .png file.  After resizing the control, I replaced each of the images with a new one in the corrected size.  After replacing the sixth image, the control now always shows it's highlighted version and the Picture Item entry in the run-time menu has vanished.  How do I restore the control's behavior to enable all six images?
    Attached is the affected .ctl file:
    Edit:  I'm working in Labview 8.6.1f1.
    Solved!
    Go to Solution.
    Attachments:
    Button.ctl ‏20 KB

    It seems like the last image that you pasted went into the Boolean Text layer.  Since this layer seems like it can hold only one image, the picture item menu doesn't exist, and all of your attempts to right-click on the button were right-clicking on the boolean text.  Switching to Customize mode allowed me to move the Boolean Text layer away from the button and then I could see that the various picture items were still intact.

  • Customizing Tab control and Enum

    I am trying to do two things here regarding customizing controls.
    The first is to add a down-arrow decoration to an enum so that it looks kind of like a menu ring (click the down arrow to drop down the selections).  If I simply paste it on top of the control, the decoration will intercept the click and not drop the selections down.  I want to have the control colored, so putting it behind and making the ring text background transparent doesn't really work either.  If I make it part of the "Ring Text" background element, it's fine for that one size, but if I resize the control it gets all stretched out.
    The second is to modify the "Page Labels Display" in a tab control.  The only selection allowed when attempting to customize the tab control is to "replace" the page labels display with a different control type.  Every enum or ring that I've tried has simply beeped at me with no replacement.  I would really like to get the aforementioned Ring-styled enum in this box as well.
    One other quirk that I haven't noticed before (Maybe since I haven't done a lot of work with tabs in the past), but when I'm trying to get context help for anything inside of a tab, the only thing that shows up is the context help for the tab itself.  Is that "working as expected"?
    Regards,
    Mike

    hi Mike, 
    there is another discussion forum covering your first question, but it sounds like your best bet would be a ComboBox: 
    This will give you the appearance you want, and behaves the same as an Enum.
    In order to set up a similar drop down menu of the pages of a Tab Control, it will be a little more indirect. Take a look at the attached example, which populates a combo box with the pages of a Tab Control. 
    That quirk you mentioned with the Context Help and Tab Controls is a known bug, and is fixed in LabVIEW 2011. Hope this helps!
    ~kgarrett
    Applications Engineer
    National Instruments
    Attachments:
    ex get pages from tab control.vi ‏10 KB

Maybe you are looking for

  • An issue with authentication and authorization on ISE 1.2

    Hi, I'm new to ISE. I have an issue with authentication and authorization. I have ISE 1.2 plus patch 6 installed on VMware. I have built-in Windows XP supplicant and 2960 cisco switch with IOS c2960-lanbasek9-mz.150-2.SE5.bin On supplicant I use EAP(

  • Restricting the Select-options by using the FM   "SELECT_OPTIONS_RESTRICT"

    Hi , Thank You very much for reading this query. My requirement is, I need to display 3 select-option fields on my selection screen. 1) Field1 is S_periods which is to populate the Numbers.For this field I need to provide the options single and range

  • Icecat opens a Firefox window if Firefox is already open (&vice-versa)

    I have both Firefox (firefox 13.0.1-1) and Icecat (icecat 12.0-1, from AUR) installed. If a Firefox window is open and I launch Icecat, an additional Firefox window appears. If Icecat is already open and I launch Firefox, an additional Icecat window

  • Adding Property MetaData to Upload screen

    Hi, I would like to add some Property Metadata for documents that I upload to the KM. I have managed to created a new tab with all my properties, but I would like to have some of these properties on the first screen of the upload process, meening, ne

  • MuVo trou

    I had problems where I couldn't play songs, the LED turned from green to red right away. I attempted to download the firmware. I just bought the 22MB MP3 player and I can't get it to work. The problem is the when I go to download the firmware it does