LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Resize window maximize issues with splitters (docking example).

Solved!
Go to solution

I am trying to learn how to use the Splitter control to make a resizable window where some content (like a table or text box) resizes, but other controls (like buttons) just move.

 

I found the docking example, and it is exactly what I am trying to recreate.

 

When I try to build my UI, it seems to work as I want when resizing, but it messed up when I maximize. I am clearly not anchoring things the same way the docking example does, and I am unsure where I can see those settings.

 

NOTE: My recreation appears to work fine on my main monitor, but messes up on a secondary monitor. But, the docking example works fine on both.

 

I see where you set it when you add/link something to a splitter, but I don't see how to tell how things are set in the docking example. Is there a reference/tutorial that explains how it was built?

 

Thanks!

0 Kudos
Message 1 of 5
(3,031 Views)

The docking example does really nothing in the code, as 99% of its functionality lies in the built-in capabilities of the splitter controls.

To understand how controls are tied to the splitters you need to edit one of them, then hit Attach/Detach Controls... button: in the following window click on a control in the right area and see how it is configured in the Attachment Mode control below:

Screenshot 2019-08-01 07.41.40.png



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 5
(2,985 Views)

I've done that, but still get different behavior in my UI versus the docking example. On mine, at around a screen height of 1200, it stops moving items down with the bottom of the screen. Whenb I start decreasing the height, everything shifts up (even though there is a big gap at the bottom). I "assume" there must be more settings in the docking example I am unaware of. I've simple made a panel, added the splitter to the right and bottom and named them similarly (VSPLITTER, HSPLITTER) and attached a few things to the right, a few things to the bottom, and a few to both (bottom right buttons, so they stick to the bottom right). It all works unless the screen gets too tall.

 

Yet docking does not have this issue. Very odd. I need to figure out what I am not doing.

0 Kudos
Message 3 of 5
(2,963 Views)

Could what I am seeing be tied to the "Operation Range" settings of "Top Side Auto Range" and "Bottom Side Auto Range"? Mine are both checked, just like the docking example, so probably not. I'm not sure what else could limit the automatic splitter moving to cause it to stop (but still move the other direction).

0 Kudos
Message 4 of 5
(2,941 Views)
Solution
Accepted by topic author AllenHuffman

SOLVED.

 

One of my Splitters was accidentally attached to the other Splitter. That was causing the results I was seeing. Once I removed it, it now works like the docking example.

 

Thank goodness for those dotted lines, or I never would have caught it. I didn't realize the lines I'd been looking at were an attachment -- I thought they were just connecting all the anchored objects together 🙂

0 Kudos
Message 5 of 5
(2,937 Views)