Disallowing panel resize below minimum?

Is there a way to forbid active resizing of a panel below minimums?  I've read this post and looked up example projects, but they mostly deal with the EVENT_PANEL_SIZE event (after the resize is done).  
I'd like to utilize the EVENT_PANEL_SIZING event which is while the resizing is happening.  The idea is this:
As you click and drag the size of a panel, I would like the panel to stop resizing with your mouse cursor once the minimum height and width dimensions are reached.  This seams like it should be easy.  But I can't quite crack it.
Solved!
Go to Solution.

Yes, there's a trick to EVENT_PANEL_SIZING to constrain sizes (I think it's in the list of examples, otherwise search for it).
But personally I find it easier to use EVENT_PANEL_SIZE and GetPanelAttribute(...ATTR_WIDTH) and "if (Width<Limit) Width=Limit" before doing the disposition of my controls. This way you avoid errors (negative size or position controls) while still allowing the user to give the panel a tiny size to get it 'out of the way'. There's no real drawback to this. I think.

Similar Messages

  • Is there a way to achieve 'Panel Resize Event Filter' like function?

    Gopalakrishnan P
    Hi all,
    Panel resize filter is not available in Event structure. So if I use the below code, on pressing the maximize button, windows will maximize the front panel and later LabVIEW brings it back to the mentioned size. There will be a flicker during this operation. To avoid this flicker, is it possible to disable windows OS to perform maximize event or to set the default window maximum size in windows or any other way to implement this?
    The maximize button should not be disabled, but  have to maximize the panel to a specific size without that flicker. What I'm actually trying to do is to use windows messaging queue to capture the maximize event and then implement the same through LabVIEW. Related example is in this link http://zone.ni.com/devzone/cda/epd/p/id/4394 
    Has anyone tried solving a similar problem by this method?
    Also please suggest if there is any other way to achieve this.
    Gopal
    Thanks,

    Hi Krishgopal,
    Please try the following method
    File»VI Properties and choose Window Appearance from
    the Category pull-down menu.
    Click the Customize button and Deselect  the option : Allow user the resize window
    Attached is a screenshot of the same.
    Please let me know if this is able to help you out.
    Regards,
    Ankur
    Attachments:
    No_Resize_Front_Panel.pdf ‏274 KB
    Sample_NoResize.vi ‏6 KB

  • Limit Panel Resize to One Dimension?

    Is there an easy way to limit panel resizing to a single dimension? That is, can I make a front panel that allows resizing the HEIGHT but not the WIDTH?
    What would be nice is if there was a way to set the "VI Properties>>Window Size" MAXIMUM size along with minimum (default to <Inf>). But I would settle for a programmatic way to do it, too. I tried making a UE to catch the <Panel: Resize> event, and replace the "Left" and "Right" bounds of the NewBounds with those of the OldBounds, but that ended up doing some wonky stuff.
    Anyone out there found a solution for this problem?
    [I should add, I'm still running LV 8.6.1...maybe this has been addressed in later versions?]

    I'm pretty sure that there isn't, as I don't think Windows supports it and resizing windows is presumably handled by it.
    If there's a window message associated with the resize, you might be able to intercept it using some platform-specific code, but that's beyond the realm of my own experience.
    One thing you can try to do is disable the resizing completely and then add your own resizing logic and code (such as buttons near the edge which will expand or compact the UI by X pixels). I think this is what you usually see in programs which allow expanding in only one direction (although usually the buttons expose an entire pane at once).
    Try to take over the world!

  • Error Message in Delivery : Quantity falls below minimum inventory level

    Version : SBO 2005 A SP01 PL22
    Description of Issue:  When trying to Add a Delivery you get Error Message: Quantity falls below minimum inventory level [Delivery - Rows - Warehouse Code] [line: 0]  [Message 131-14].  You are then unable to Post the Delivery and Print the corresponding Packing List.
    Testing Findings:  Upon detailed testing of this issue and work with SAP Support it has been determined that the issue is that the Delivery Row Ordered Qty is looking at the OITM In Stock Qty when determining if the full Row Qty can ship instead of the OITW In Stock Qty.  This is an issue because due to other "bugs" this Client has encountered their OITW Qtys in other Whses are negative, even though they have the Block Negative Inventory and the Manage Inventory by Warehouse Flags Checked On.  This then reduces the OITM Qty below the level of the Delivery Row and you get the above error message. 
    Example:  A Sales Order Row has an Order Qty of 15 for Whse 01 for a particular Item.  The OITW In Stock Qty for Whse 01 = 17.  The OITW In Stock Qty for Whse 03 = -7.  The Block Negative Inventory and Manage Inventory by Whse Flags are both Checked On.  The 'Net' OITM In Stock = 10.  When you try to Copy the Sales Order to a Delivery and Add the Delivery, you get the above Error Message and it will not allow you to Post the Delivery and Print the Packing List.
    Current Workaround:  Client is performing Inventory Goods Receipts to bring the In Stock Qtys in the affected Whses to greater than or equal to zero.
    Proposed Solution:  SAP Development to add logic to SAP Business One to validate the Delivery Row Qtys to Ship against the OITW In Stock Qtys instead of OITM when the Manage Inventory by Whse Flag is checked on. 
    Supporting Documentation: This DRQ Request relates to Support Message # 864405 2007.  All above referenced testing details including example SO#'s, Item #'s, etc. and an entire copy of the Client's database are available and linked to this Message #.

    Hi Ramu,
    also you can  make sure you are choosing the right WH in ctrlshiftS windows if You do, then chek on Inventory -> Inventory report -> inventory status if you have enought and available quantities for the delivery, if you dont then you gonna have to make the PO and the AP Invoice to add more quantity to that item
    regards

  • Error While Creating Delivery : "Quantity falls below minimum Inventory"

    Hi All,
        I have an error while creating a delivery in BusinessOne. I have created a new item using the BusinessOne UI. And i created the salesOrder for this item and it was created successfully. But when i tried to create a salesDelivery for this Item i am facing an error that "Quantity Falls below Minimum Inventory".
          How can i solve this? How can i add quantities for this item in the inventory?
    Thanks in Advance,
    RAMU.

    Hi Ramu,
    also you can  make sure you are choosing the right WH in ctrlshiftS windows if You do, then chek on Inventory -> Inventory report -> inventory status if you have enought and available quantities for the delivery, if you dont then you gonna have to make the PO and the AP Invoice to add more quantity to that item
    regards

  • Quantity Falls Below Minimum Inventory Level

    Hi!, I have an item that we manage  by warehouse, we've set the minimum inventory level to 5000 pieces.
    So the MRP has procured me 5000 pieces through a purchase order. I received my item through Goods Receipt PO and now that I want to transfer it to another warehouse I get a message "Quantity Falls Below Minimum Inventory Level".
    I though the purpuse of the minimun inventory level was to procure more, not to lock transactions on the item. Is there a setting that I can tweek so I can use my 5000 pieces?
    Thank you.

    Hi,
    That message is a warning only.  If you have enough authorization, you could still get all necessary transactions done without problem.  The message is not avoidable.
    Thanks,
    Gordon

  • Panel Resize - how to tell when mouse released?

    I need to programmatically resize all my controls when the panel is resized.  I can't use the automatic option, as I have some specific things to do, e.g. some controls stay at fixed size, others resize.
    I've used an event structure and am doing the resizing on the "Panel Resize" event.  The problem is that this takes a little time, mainly as one of the controls is an Adobe Reader ActiveX control, which takes a little time to rescale and redraw.
    The result is that the VI seems to queue up the events as the panel is resized - if you grab the corner of the window and move it around, the VI then sits and ploughs through all the events that were created as it was resized.
    What I'm really after is an event that fires after the panel has been resized and the mouse has been released.  Is there a way of achieving this?
    Thanks

    There's no event for this, but you can filter your events, for example, like this:
    There are other variations on this (setting a flag, using a case structure in the original event case, etc.).
    Try to take over the world!
    Attachments:
    Example_BD.png ‏2 KB

  • Problem with panel resize option

    Hi all,
    I am working on an application which i want to run on all the different resolutions. So, i searched the whole LV forum to get the solution for my problem.
    after going through many related discussions i found that one should develop the app in the min resolution which it should support and in the VI properties the option for panel resizing should be tick marked.
    i did exactly the same, but still couldn't get it worked for my application.
    i am developing my app on 1024*768 resolution. it runs fine on the same resolution if i don't tick mark the resizing option. but, when i tick mark the option and run the app on the same resolution, it crops some part from the bottom.
    I am attaching the picture of the interface when run with resizing option and without it.
    Pls look into the prob and let me know how can i make it work?
    Thanks,
    Ritesh 
    Attachments:
    Interface_With proportions.JPG ‏95 KB
    Interface_Without proportions.JPG ‏103 KB

    For a GUI of this nature, there is no easy answer to this problem.  Search the forums for "large font" to get many examples of how people have solved this issue.  I usually bite the bullet and handle all resizing myself.  An example of this can be found here.
    Since you want to cover the entire workspace, you need to know what this is.  There are two VI server methods which will give you pieces of this information.  Display:All Monitors will give you the valid coordinates for all monitors attached to the computer.  Display: Primary Workspace will give you the useable workspace of the primary monitor.  This does not include the space used by the Windows taskbar (and, I assume, the GNOME, OS X, or KDE equivalents, but have not verified this), so is different from the area given by the first property.  You can fairly easily determine which display is the primary workspace by checking bounds, but do not assume that the taskbar is on bottom of the display when you do this.
    If you have problems finding information or something is not clear, let us know.
    Message Edited by DFGray on 03-03-2010 08:10 AM
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Front panel resize delay

    Hello,
    I am developing GUI that needs to look nice and user will have option to resize it. Since scale as the window property works bad I wanted to use panel resize event.
    But there is delay - controll is resized some time after I resize front panel and that looks bad. When I look on project window or error list it resizes instantly. 
    Why I can't achieve that result in Labview??
    I could always read panel size lets say every 10ms and calculate ontrolls size based on that,  but is there better option using this panel resize event??
    Solved!
    Go to Solution.

    Right click on the pane (right click in the bottom right hand corner) and select the 'Scale objects while resizing' option.
    That should fix it for you
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Panel resize event bug?

    I'm having a bit of hassle with a panel resize event.
    For reasons best known to me, I have some parallel loops monitoring certain UI behaviour and reacting appropriately.
    I have noticved that when a loop which is monitoring the "Panel Resize" event stops, (No dynamic registration) the next panel resize will freeze the VI.  It's as if the Event case is not releasing the handle to the "Panel resize" event.
    If I handle the "Panel Resize" event via a dynamic registration and subsequent release, everything works fine.
    This is in LV 8.2.1.
    Shane.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant
    Attachments:
    Freezes.vi ‏22 KB
    Doesnt freeze.vi ‏24 KB

    tst wrote:
    I think this has to do with LabVIEW locking the FP (as configured) even when the event structure should not execute any more. I actually created a simple example of it recently, but saved it in one my projects instead of where I would see it, so I forgot about it. I now dug it up and back saved it to 8.0. You can also simplify this example by removing the value change event and making the key down event lock the UI.
    Message Edited by tst on 11-10-2008 02:14 PM
    Sorry Yair,
    but this is not a bug!, it is explainable behaviour and expected behaviour.
    What happens, the front panel is locked on the second edit. (use exectuion high-lighting) The event structure is always listening for events where it is registered for, even if the event case will never execute, on the first edit (key down) the event is triggered and the VI is locked and unlocked. The second edit the event is triggered again and the FP is locked. Because the event structure can't execute the FP stays locked.
    Shane's behaviour is truly a bug.
    The same behaviour is seen with the 'Pane:size' event. (in 8.6)
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Panel Resize respect to Text Size : How To?

    I have a panel named "description", It has only one text
    control named "detail".
    "detail" is a dynamic text control which gets data from an
    xml file and displays the
    detail of required thing.
    things have long and short details.
    I want that Panel resize its height according to the height
    of text control.
    I am a newbie and have no idea.
    Please Help

    Text object resize with the text it holds.
    Add Text object to a VBox and set the width property of the
    Text to 100%.
    It should do what you want.

  • Spry Collapsible Panel Resize Problem

    I have 2 collapsible panels within  a table on a site, and it works great, except for the fact that when all of the panels are closed:
    In IE7: The tabs move to the middle of the table and break the layout.
    In Firefox: The tabs move to the BOTTOM of the table and break the layout.
      The example can be found here:
    http://www.go9production.com/agm/products1.php
    It looks to me like it's resizing the entire cell and making it too small, but I don't know how to fix this without preventing it from getting larger either.  Can anyone help me at least get them to close at the TOP of the page rather than the middle or bottom?

    This is what I see in Chrome
    and similarly in IE7/8/9, FF and Safari
    Gramps

  • Photoshop CC 2014 - color panel resizing by itself?

    Hello,
    I am wondering if anyone else has reported (or even experienced) the new color panel in Photoshop CC 2014 resizing itself when maximizing and then restoring the Photoshop CC 20114 application frame?
    Here are some images to illustrate the issue I am experiencing:
    This is on initial launch of PS CC 2014 after install and then reboot.
    This is the initial maximize of PS CC 2014 application frame (using green button).
    This is the initial restore command (using green button).
    This is the second maximize (using green button).
    This is the second restore command (using green button).
    This is the third maximize (using green button).
    ... and the fourth maximize (using green button).
    As you can probably see through the progressive process that the color panel is stretching vertically with each maximize / restore combination. It seems to stop stretching after the fourth series.
    Machine specs:
    MacBook Pro 17" (late 2011)
    2.5 Ghz. i7 Intel Processor
    AMD Radeon HD 6770M - 1 GB VRAM
    16 GB RAM - OWC Brand
    480 GB SSD - OWC Brand
    OS X 10.9.3 - Clean Install (all updates installed)
    PRAM and SMC refreshed
    Permissions repaired
    Disk verified
    Clean Install of:
    Adobe Creative Cloud app
    Adobe Photoshop CC 2014 app
    Adobe Illustrator CC 2014 app
    No plug-ins or other third-party add-ons.
    I thought I would mention it in case this hasn't been reported yet (or perhaps there is something bizarre going on with my machine).
    Thanks for any insight or acknowledgement.

    Just giving this a bump and a quick note.
    I just performed a clean install of OS X 10.9.3 again on machine spec'd above and then installed Photoshop CS6 and Illustrator CS6 perpetual license versions. While the new color panel seen in PS CC 2014 is not part of CS6, I wanted to test to see if the color panel was resizing itself as I saw with PS CC 2014. It is not.
    I am running Adobe CC 2014 versions at work on a Dell workstation under Windows 7 Professional. I will test on that system to see if the same resizing of color panel by itself occurs and post back sometime tomorrow.
    Note - if an engineer, staff member or moderator could mention whether this has been logged as a potential issue that would be great. I will of course log a report with a link to this post this morning.
    Thanks for any response.

  • Accordion - Ajax within accordion panel resize issue

    Hi,
    I'm in a little bit of a fix.
    I have an accordion whose panels have ajax enabled regions
    within them.
    The ajax enabled regions have search forms which give a
    search result within the same page (which is basically within the
    panel as well) once a button is clicked.
    My issue is that once I click search, my result set increases
    the size of the page causing the accodion panel to enable a scroll
    bar. Is there some way in which I can have spry resize the panel
    instead of it enabling a scroll bar?
    If I open and close the tab ofcourse, the region is resized
    to cater to the search results as well with no scroll bar.
    Incase this is not possible, is there a way to reopen the
    selected panel on a page refresh event as all the tabs are closed
    when a refresh occurs.
    Thanks!
    When the accordion opens up, it shows

    Hi kundalani,
    If you are using Spry.Utils.updateContent() to load the
    contents of the panel, you can pass in a callback that sets the
    height of the AccordionPanelContent to "auto" after the new content
    has loaded:
    function LoadContent(ele, url)
    ele = Spry.$(ele);
    Spry.Utils.updateContent(ele, url, function() {
    ele.style.height = "auto"; });
    <a href="#" onclick="LoadContent('e1p2',
    '../../data/frag1.html'); return false;">Frag 1</a> |
    <a href="#" onclick="LoadContent('e1p2',
    '../../data/frag2.html'); return false;">Frag
    2</a></p>
    <p> </p>
    <div id="example1" class="Accordion" tabindex="0">
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Panel 1
    </div>
    <div id="e1p1" class="AccordionPanelContent">
    <p>Panel 1</p>
    </div>
    </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Panel 2
    </div>
    <div id="e1p2" class="AccordionPanelContent">
    <p>Panel 2</p>
    </div>
    </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Panel 3
    </div>
    <div id="e1p3" class="AccordionPanelContent">
    <p>Panel 3</p>
    </div>
    </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Panel 4
    </div>
    <div id="e1p4" class="AccordionPanelContent">
    <p>Panel 4</p>
    </div>
    </div>
    </div>
    <script type="text/javascript">
    var example1 = new Spry.Widget.Accordion("example1", {
    useFixedPanelHeights: false });
    </script>
    --== Kin ==--

  • Prohibit resizing below a certain window size

    I was wondering if anyone has some useful insights into the following problem:
    I have a scene with a certain initial size. Resizing is allowed, however below certain dimensions the application becomes unusable as not everything can be displayed (Think of an image that should be displayed in a window that is smaller than the image).
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    public class ForceMinSize extends Application {
        private double minWidth = 100;
        private double minHeigth = 100;
        @Override
        public void start(Stage primaryStage) {
            try {
                Image img = new Image( getClass().getResource("kajak4_small.png").openStream());
                ImageView imgView = new ImageView(img);
                StackPane root = new StackPane();
                root.getChildren().add(imgView);
                Scene scene = new Scene(root, 190, 163);
                primaryStage.setTitle("Force minimal size");
                primaryStage.setScene(scene);
                primaryStage.show();
            } catch (IOException ex) {
                Logger.getLogger(ForceMinSize.class.getName()).log(Level.SEVERE, null, ex);
        public static void main(String[] args) {
            launch(args);
    Resizing the components to match the size is not an option. As the dimension properties of the stage are readonly I can only get notified when the size goes below the threshold, but can do nothing about it. The only other solution I can see is disabling resize and only allow the initial dimension (configurable) and fullscreen.

    primaryStage.setMinWidth(minWidth);
    primaryStage.setMinHeight(minHeigth);

Maybe you are looking for