puu.sh/kiQ0k/aa28192731.png
Does anyone know how I can manipulate the objects in this form? I would really like to be able to edit some of the tabs. It's using DevExpress v14.1
To edit the tabs, just click the tab control and use the design time helper icon on the tab controls upper right corner. There, you can find a link called "Tab pages".
Alternatively you can just select the tab control by clicking and head over to the properties window (press F4) as you can do with every control. There, you find a property called TabPages.
If you want to edit the controls on the tabs, just do so by selecting them per mouse click and change the controls' properties on the properties window (press F4).
The issue was that DevExpress wasn't installed on my system and thus wouldn't let me modify the elements. Simply installing the right version fixed the issue.
Related
I have a label that I need to stay on top of my TabControl as I switch from tab to tab. I have tried calling the Label's BrintToFront method in the SelectedIndexChanged Event of the Tab Control but this has no effect. I also simply tried right clicking my label in design view and selecting "Bring to Front" but again, this had no effect.
When I switch to my second tab it drops behind the TabControl however, when I go back to my first tab it is in front again.
I placed the label itself on the Form rather than on the TabControl.
I am working in C#. Any ideas would be greatly appreciated. Thanks.
You should make sure that your label is not located inside a specific tab. To verify this you need to look at the nesting inside the 'document outline' (ctl+alt+T)
If it is I recommend;
dragging it just outside the tab control (you can also use the document outline).
then 'bring it to the front'.
and then use the arrow keys, or location property, to move it back into position.
I have a tabControl control with multiple tabs. For each tab, I am adding tab index arranging the controls from top to bottom.
However, when I click tab during the program the order that the program moves from control to control isn't the order I specified.
Does this have something to do with the tabControl?
I am using the "tabIndex" property for each control.
Edit: Sorry I didn't know about this function, here is what it shows:
http://s7.postimage.org/m9burkbx5/Tab_Order.jpg
The red arrow is the flow the tab makes.
With TabOrder tool active, first click on each container controls (eg. the groupboxes) then, if the controls order inside the groupboxes, is not correct, click on each control in the order you desire them.
You will see the number change accordingly to your clicks. Sometimes happens to click in the wrong order, in this case close the TabOrder tool and reopen to restart again.
I need to create a control which has a single permanent tab ("home"), and all of the other tabs are scrollable.
Right now I am trying to achieve this result by subclassing the TabControl, adding an extra button (which looks like a tab) to the overridden template, and setting the SelectedIndex to -1 whenever the button is clicked. When SelectedIndex is -1, a trigger causes the TabControl's ContentControl to be bound to a special "Home" tab's content. Basically, I am faking the behavior of a real tab and overriding the ability to deselect all tabs in doing so.
This seems to work, except for two problems:
Select example tab #3, then select home. THEN, try to select tab #3 again. Tab #3 doesn't respond.
Select tab #3, then select home. THEN, try to use the menu which happens to be in the same window. When I go to use the menu, #3 pops up as the selected tab again.
I've tried to listen to all kinds of events associated with the TabControl at this point, but none of them seem to give me something I can work with to get around these behaviors.
Is there something out there that will allow me to override the default SelectedIndex behavior? Should I be doing this another way? Ideally, I would like some way to take in a collection of tabs that allows me split up the tabs visually without losing the basic functionality of a TabControl.
The only way I can think of to accomplish this would be to use a custom ControlTemplate for the tab control. You can use StyleSnooper to get the current template. The that is part of that template would need to be replaced with a custom panel that you wrote. You base that on Panel. You would only need to override ArrangeOverride so that it arranged the Home tab in its place, and the others depending on the scroll position.
I was able to implement this by writing my own custom tab panel, as AresAvatar suggested. However, the panel needed to extend from the ConceptualPanel implementation from http://www.codeproject.com/KB/WPF/ConceptualChildren.aspx. The problem is that the panel needs to have IsItemsHost="true" in the TabControl template to preserve the tabs' selection behavior. Unfortunately, once a normal panel is an items host, it's Children can't be changed from inside it's own class code. So, I couldn't add the scroll buttons that I needed. I was able to get around that problem with the ConceptualPanel by adding everything (tabs + scroll buttons) via AddVisualChild.
There might be a better way to do this, but this worked for me.
I have a form with a bunch of panels, and some panels inside groupboxes. When using the TabOrder tool in Vs2005, the controls outside of containers are given integers (0), the controls inside panels are given decimals (72.0), and the controls within panels within groupboxes are given three-part values (73.73.0). Unfortunately the resulting tab order has nothing to do with the order I clicked my controls.
Does this tool simply not support nested containers? Am I doing something wrong? Perhaps holding Shift- or Ctrl- when I click (I've tried these with no success)?
Am I going to be forced to manually type in three-part tab orders for all my controls? That would be a bummer.
The tab order tool is not designed for you to enter values manually; it is designed for you to click on controls in the order that you'd like them to progress as the user tabs.
The numbers are not decimals; they represent the tab order of the control within its parent container. For example, if you have a Form with a Panel named panel1 and a Button inside of it named button1, then button1 would display a number like:
X.Y
X is the tab order of panel1
Y is the tab order of button1 within panel1.
I will acknowledge that the designer isn't as intuitive (or transparent) as it probably should be, but it does work.
I had the same problem with textboxes and buttons within group box in VS2010. TabOrder tool was just useless: Tab orders were broken no matter how I re-ordered the tab stops. In order to make the correct tab order I had to re-order of how controls are added to the group box in form designer initialization code:
this.groupBox2.Controls.Add(this.startTimeTextBox);
this.groupBox2.Controls.Add(this.endTimeTextBox);
this.groupBox2.Controls.Add(this.exitButton);
This way tab order would be startTimeTextBox -> endTimeTextBox -> exitButton and so on.
I think I figured out the way to do it in the designer: the trick is apparently that you have to click the panels/groupboxes as well in order to assign the different parts of the full ordering; in this way, it seems that a bredth-first clicking method needs to be used as opposed to clicking the child controls themselves.
Kinda sad, since it forces you to know the full structure of the whole form instead of just what the user sees.
I had this same problem and discovered this tool: http://archive.msdn.microsoft.com/cdstabindex
I had to change the manifest to make it work with VS2010 though. Also, I've modified the source code for myself to make the UI a little better, but even as it is, I would recommend having a look at this tool.
Remove Group-boxes from Controls and try again this works for me :)
UI is created in VS 2008. I'm using C# .... I need to let the user move/focus between text fields from top to bottom by clicking tab button. How can i do it?
On the Layout toolbar (will normally show up if you're in Design View) click on the buttom on the most right (it's called tab order).
Now on every element on your designer will come up a little box with a number. Just click all your elements in the order you like and they will automatically be re-ordered.
If you like to do it manually, just take ho1 advice and change the property manually.
You just set up the TabIndex property properly, so that it's sequential from top to bottom. Then it'll work automatically and you won't need any code to move around the focus.
So in other words, set the top TextBox TabIndex to 1, the next one you set to 2 etc and then one at the bottom will have the highest number (of the textboxes, you probably want to have even higher indexes for any OK buttons and similar so that the user can jump to them after editing all the textboxes).
You can find more info about it here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.tabindex.aspx