I will like to only show icons on tabs without emptying the text. I want text to appear in the caption, but not on the tab. I am setting the TabLocation to Location.Left and the text is taking a lot of space and this is the reason I want to only show icons.
Also, the tabs start at the bottom. I will like them to start from the top and go down. I noticed that if I dock to the right and set the tab location to the right the tabs start at the top and go down. I want that behavior on the left side.
Hello ,Jose
Thank you for posting. For your first requirement, you can use ‘CompressUnpinnedTabs’ property, this will hide the text and show just the icon for the non-selected unpinned tabs.
About your second requirement currently, we do not have any property/event to behave the same on the left side . This is how control is been implemented.
This would be a new feature idea for us which you can suggest for future versions at <ideas.infragistics.com>.
Although you could most likely achieve this using a creation filter to move the TabGroupUIElements or TabItemUIElements around.
Thank you in advance to submitting your product idea
Regards,Divya Jain
Divya thank you for your reply. CompressUnpinnedTabs is what I am using right now, however, I also want the selected tab to not have text. Since Infragistics does not currently support what I need, I will like to modify the source code where Infragistics implements the CompressUnpinnedTabs behavior to also not show the text for the selected tab. Is TabItemUIElement.PositionChildElements the correct place to do this?
I think it would be a lot more complicated than that. Simply modifying the UIElement will affect the display, but not the metrics. So the control would still leave space for the text, even if you were to remove the text UIElement.
You actually don't need to modify the source code to do that, by the way. You could use a CreationFilter.
What I would do... and I haven't tested this out, but it seems like a reasonable approach, is to go the other way. Set the text/caption to an empty string (or maybe a single space character. That gets you what you want for the tabs.
Then all you have to do is use a CreationFilter to add a TextUIElement into the header to display the caption for the pane. This might be a littler tricky, but the advantage of this approach is that since there is no actual text/caption, the tab sizing will be correct. And there is presumably already enough empty space in the pane caption so you can add the back into the display without having to worry about the metrics.
Thank you Mike for suggesting to use CreationFilter. I got it working. Tabs don't show text, but captions show the text that I want. However, I found another problem. Pressing Ctrl+Tab shows the window to navigate to the available tabs and now the names are empty. I am not sure if how easy it is to show text in that window. Do you have any suggestions?
Also, Divya mentioned that when setting the tab location to the left the icons show at the left bottom per design. I need them to show at the top left like they show on the right. That is part of a design I am working with our visual designer. I tried modifying GroupTabManager.TabOrientation to return TabOrientation.TopLeft when the tab location is Location.Left, but it did not work. It messed up the tabs. How do I make it happen? I noticed that when the tabs are unpinned the icons move to the top left and as soon you pin them they move to the bottom. So, there is code that supports what I need.
Hello Jose,
Thank you for the update. You can use 'TextTab' property of the pane. This is the text displayed in the tab for the pane. However, if this property is null, it will resolve to using the Text property. The NavigatorForm uses the Text property on the pane. set TextTab property on the panes to string.empty.
I have created a small demo sample for your reference.
About your other requirement of aligning the tabs to the top left instead of bottom left , There's no way to orient that tabs to the top, this is still a new feature idea.
But as you are willing to update the source code you could modify it in the GroupTabManager.TabOrientation implementation.
Right now, it's taking TabLocation and also just resolving it to LeftBottom. So you could change that to return LeftTop. Or maybe add some kind of extender and check that, upto you.
Like this:
TabOrientation ITabProvider.TabOrientation { get { switch(this.Group.GroupSettingsResolved.TabLocation) { default: case Location.Bottom: return TabOrientation.BottomLeft; case Location.Top: return TabOrientation.TopLeft; case Location.Left: //return TabOrientation.LeftBottom; return TabOrientation.LeftTop; case Location.Right: return TabOrientation.RightTop; } } }
Let me know if you have any question.
Thank you,
Divya Jain
Mike and Divya, using the TextTab property is a simpler and more elegant solution than using a creation filter. I got it all working. The tab icons appear at the top-left without any text. Also, captions are not empty and the NavigationForm shows text. Thank you for your help.
Hello ,
Sorry, my attachment didn't go through because of sample size, I delete the bin folder and attached it here again .
Please find the attached sample.
6332.WindowsFormsApp2.zip
-Divya Jain