AutoHideTabSelectedBackground

Docking/MDI for Windows Forms Forum

Posted 14 years ago by tobias weltner
Avatar
I changed the color for AutoHideTabSelectedBackground, and it changed the color for all tabs, not only the selected.
Also, I noticed that the tabs are not overlapping like in VS 2005. I changed AutoHideTabOverlap from 12 (default) to 40, but it did not change anything.
What am I doing wrong?

Comments (11)

Posted 14 years ago by tobias weltner
Avatar
Also, hovering over a tab already unhides the tool window.
Is there a way to force the tab to be clicked?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
They only overlap if they are in a group (same tool window container) when you hide them. Otherwise they will be in different auto-hide groups. This matches what VS.NET does. There is one selected tab in each auto-hide group.

The overlap setting only works if you have multiple tool windows in a group, which probably isn't the case in you scenario.

Hovering and clicking both cause another auto-hide window to be displayed, which is what VS.NET does. Do you want an option to turn off hovering?


Actipro Software Support

Posted 14 years ago by tobias weltner
Avatar
Yes, an option to turn it off would be great!
I may be a complete idiot but I can't figure out how to place more than one control into a tool window to make it a group.
With dock manager, I can only add new tool windows.
When I place controls into them, they all behave like one tab.
Is there a way to add controls to a group using the GUI, or do I need to call Add to add the controls programmatically? Or am I completely off topic? ;-)
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
There's different things you can do...

1) Make multiple tool windows with one child control that is Fill docked in each. If you "attach" the tool windows then auto-hide them, they will appear in the same auto-hide group. Our sample project shows how to attach 3 in a row off a menu item in the File menu.

2) Add multiple child controls to a single ToolWindow. Since ToolWindow is a Control itself, you just do Controls.Add to add child controls it. However each tool window only has one tab.

3) A combination of the above where you have multiple tool windows with multiple controls in them. UIStudio is flexible so it supports any combination of those things.

Just remember that each tool window has a tab when attached to another tool window. If a tool window container with more than one tool windows in it is placed in auto-hide mode, those tool windows will be grouped in auto-hide.

Hope that helps!


Actipro Software Support

Posted 14 years ago by tobias weltner
Avatar
I'll try to work my way into it. ;-)
In the meantime while experimenting with UIStudio, I found that once I cut and paste (or copy and paste) a tabstrip control, I can no longer access the individual tabs. How come?
Posted 14 years ago by tobias weltner
Avatar
When I do group two tool windows together and autohide them, they show group tabs in design mode.
The moment I launch the app, the *real* tool windows are not grouped, however.

When I start a new app from scratch it works like you described. I wonder though which setting could cause my existing app to ignore grouping.

I added two new tool windows to the existing app and grouped them in design view. Same result, they do not appear as group. Seems to be a global setting that prevents them from grouping. I'll keep looking...
Posted 14 years ago by tobias weltner
Avatar
I guess it was:
AutoHideButtonAffectsSelectedTabOnly
If set to true, it causes groups to break up I guess... ;-)
really, you got *great* controls and a very responsive and competent support.
If only the documentation was a little more descriptive ;-) until then, I keep asking my questions and hope you don't mind...
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes, AutoHideButtonAffectsSelectedTabOnly is the option that would cause that behavior.

As for the cut/paste thing, is that in the designer? The VS.NET designer is a real beast to work with and it's so poorly documented. Sometimes there are quirky things that happen that are tough to figure out. If that happens, maybe close the designer and reopen and it will work correctly again.


Actipro Software Support

Posted 14 years ago by tobias weltner
Avatar
Actually, the designer seems to mess up quite often.
Currently, I have a strange problem that causes me to probably re-build my entire project:
I added some tool windows as a group. For some reason, the last window I add behaves strange no matter how many I add, it's always the last one:
Once I pinpoint any window out of the group, the last window drops out of the group and turns standalone.
As a workaround, I added an additional tool window and closed it. That worked.
Next, I found out that controls I add to the tool windows with anchor to all sides suddenly become huge and extend to the right and bottom far outside the tool window.

I may look into the "designer code" to find out what happens but messing around in the designer code will probably multiply my problems ;-)

Things work nicely at first, but once things start to interact, especially the tool window issue really causes me headaches. Probably it's the VS2005 designers' fault, but it is frustrating...

Other than that, I enjoy your tools every day a little more. They are superb.
Posted 14 years ago by tobias weltner
Avatar
I found the problem after a night of testing. It seems to be a bug in UIStudio rather than in VS 2005:

In an earlier thread, I told you about the bug in UIStudio: when docking tool windows at the right side at design time and autohiding them, they "jump" to the left side once you open and pinpoint them.

To work around this issue, in my form_load I used this code:

Dim toolwindow As ToolWindow
For Each toolwindow In DockManager.ToolWindows
ToolWindow.State = ToolWindowState.AutoHide
Next

Next, I needed to attach them similar to your sample code because although they were grouped in design time, groups broke up for some reason.

I set the controls to "dock" instead of "autohide" at design time, and programmatically they were autohidden/attached and did no longer jump to the other side when pinpointing them. I *thought* I did it at this point.

However, these lines also cause the strange behavior I described in this thread, breaking groupings.
I removed the lines, and everything works fine now except for the original "jumping" bug.

I narrowed it down, and you can see this behavior in design time, as well:
If you group some tool windows and then select AutoHide for one or all of the tool windows in the group, the group is broken up.
Let's say you did autohide all tool windows of a group at design time. They will display as non-grouped tool windows in design time. When you launch the app, they again appear as autohidden group. Once you pinpoint one toolwindow out of the group, everything breaks up, though, and the tool windows turn out to be non-grouped tool windows, after all.

This explains what had happened in my case:
I hide the windows programmatically, and when I do this, the same happens that occured in design view: the groups are broken up. I then attached the tool windows again like you did in your sample code. They again appeared to be a group. However, the moment I pinpoint one toolwindow, the group breaks up again.

The only way to get autohidden groups is to not hide them in design view and call this method in form_load:
AutoHideAllToolWindowsDockedInHost

However, I still think there is something wrong with the control.


[Modified at 06/17/2005 03:33 AM]
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I know the latest build fixed the bug where it doesn't remember which side to dock on after auto-hidden in the designer.

If you want to auto-hide a group of tool windows that are in a tool window container programmatically, then use ToolWindowContainer.AutoHide(). Calling ToolWindow.AutoHide instead will probably separate them out of groups.

The problem in the designer is that you are forced to use the arrow drop-down to auto-hide a window. That always operates on the selected tool window. The auto-hide button in the title bar, works on the whole container if that one DockManager option is set. However we had to remove that button from the designer because while it worked fine in VS 2002 and 2003, using it in VS 2005 was causing VS to throw an exception. Microsoft changed something that caused issues so unfortunately we had to remove it.

One good way to get a layout exactly how you want is to save an XML layout file at run-time. Then restore it upon app load.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 9 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.