LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit sub panels movement in Main Panel

Hi,

 

Below is the requirement - 

1. I have main panel

2. Which will have multiple controls

3. On clicking those controls separate panels open

4. Requirement is - when those sub panels open they should look part of main panel. And sub panels should not go beyond certain limit.

eg- as attached in screenshot, when opened all the panels should open between the area of two black lines. But, the panels movement shall be possible horizontally and vertically within that area.

I understand, this can be achieved using Windows bound and position properties, but I don't know how to do this.

Please find sample VIs and the screenshot attached herewith.

 

Regards

Download All
0 Kudos
Message 1 of 10
(1,638 Views)

Hello SuLAB,

 

You can fix the size of your VI which you need to call in your sub panel and use the attached VI.

SubPanel boundry will be resized based on the VI which needs to be inserted.

 

Note: This VI was developed to Insert a VI into Sub panel and resize the Sub Panel Size based on VI size.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 10
(1,618 Views)

Hi Palanivel,

 

The VI does not load. It asks for SubPanel.lvlib.

Kindly share all the code dependencies as well.

Please note I want the sub panels to be inserted into the main panel within specific boundaries.

0 Kudos
Message 3 of 10
(1,601 Views)

I really could not get what you are trying to say.

I hope you have got my requirement.

Insert the two sub panels on main panel in between two black lines as shown in my attached screenshot. Sub panels should not go beyond those two lines, but at the same time should be movable vertically and horizontally anywhere in that restricted area.

Can you please write down the step by step procedure of calling your VI , along with all the project dependencies

0 Kudos
Message 4 of 10
(1,598 Views)

The only thing "missing" that is in SubPanel.lvlib is the TypeDef for the DataIn Cluster, which you should be able to recreate for yourself (since you can click on Datain to select it, then type ^H to get help that tells you how to build the Cluster's TypeDef yoursellf).

 

As Palanivel says, this does the opposite of what you want, it fits sub-Panels to VIs.  However, by studying the VI and understanding the use of the various Properties for the VI Windows and the sub-Panel, you should be able to "invert" the code to size the sub-VI to the sub-Panel.

 

I'm still unclear how you'll organize things.  The figure you included shows two overlapping VIs between the lines -- is that what you want?  How do you position multiple VIs with respect to each other, particularly if they aren't "designed" to fit neatly in a shared space?

 

Maybe you should make a better example of what you want to do, along with a discussion of how you will make sub-VI sizes compatible with each other and with the Window that will display them ...

 

Bob Schor

0 Kudos
Message 5 of 10
(1,588 Views)

Hi Bob,

 


@Bob_Schor wrote:

 

 

I'm still unclear how you'll organize things.  The figure you included shows two overlapping VIs between the lines -- is that what you want?  How do you position multiple VIs with respect to each other, particularly if they aren't "designed" to fit neatly in a shared space?

 

Bob Schor


Yes the panels should be freely moving into the space given and also should be resize-able as per user needs. and hence there is a possibility that they can overlap. They initially will open with their default sizes in the space given and they can be not necessarily equally spaced.

 

As an example to explain it better please follow the given link for Busmaster . This is an open source tool and can be downloaded.

http://rbei-etas.github.io/busmaster/

 

Wherein once  the main window opens, many windows appear only in the given area and they do not cross the boundaries of Top menu bar

 

Hope this clarifies.

 

 

0 Kudos
Message 6 of 10
(1,580 Views)

In addition to my earlier reply ->

if the single window is opened within that boundary, and if I maximize it, it should be maximized in the same boundary, and should not overlap menu bar.

 

Busmaster tool shall give you quite a good idea about what my requirement is.

A sample VI would be really helpful

0 Kudos
Message 7 of 10
(1,576 Views)

Hi everyone,

 

can anyone respond to my questions please

0 Kudos
Message 8 of 10
(1,526 Views)

LabVIEW doesn't have functions that give you an MDI (Multi Document Interface).

 

Making this yourself in pure LabVIEW is a huge pile of work. You'll run into all sorts of limitations and impracticalities. For instance, when the main window moves, there's no event to catch that...

 

Doing this with Window APIs is an option, but that is hacky. You'll run into limitations.

 

In short, if you want to  make this, you're probably on your own.

 

But do look into this:

http://sine.ni.com/nips/cds/view/p/lang/nl/nid/212114

http://www.walkingthewires.com/2018/05/11/make-your-own-labview-mdi/EDIT: Interesting, but for the IDE

 

Or google "LabVIEW MDI" yourself,or search on the forum... There won't be 'the VI that does this' anywhere.

0 Kudos
Message 9 of 10
(1,512 Views)
Message 10 of 10
(1,486 Views)