General Layout Concerns...

JaedenRuiner

Well-known member
Joined
Aug 13, 2007
Messages
340
Programming Experience
10+
Well,

I'm trying to do the layout for my form, which is already pretty loaded with controls, but I'm not too concerned with that, but mostly the appearance...with a little handling too.

Basically, the Form is designed to allow some administration of the applications database, (for those users that would need that ability), and thus it contains the BindingNavigator (with an addition combobox added for my own purposes). The ComboBox (a descendant of the ToolStripComboBox to add some personal functionality) Basically lists all the Tables in my Database (including any that I've additionally added via SQL statements, and though the Typed dataset does not "directly" typed datatable access these tables they are still accessible via the Tables() collection.

But I'm digressing here.

The Idea, is that when the ComboBox changes to select the new table, I need to have the "controls" or what not for that table to appear. Dealing with six or seven tables is quite a few "textboxes" to arrange on the form, so I was wondering about different "views".

So, Say I've got 5 tables, with the equivalent of say 4-6 Text Fields per table. I'm looking for the best, or most appropriate way (other than a TabControl, unless you can eliminate the "tabs" at the top) to psuedo animate the different views for each table.

I was thinking possibly using Panels to hold the controls and then based upon the table selected make that panel visible, but that's when I got the idea to pose the query here.

What would be the proper way to have multiple banks of controls, each bank, and to cycle through them based on a combobox value, or some other effect like that?
<EDIT>
Added Image for reference. I sort of want the controls to be viewed in the Panel1 section of the form (beneath that is a DGV for other use later)
dbform.jpg


Thanks
 
Why use text boxes? Just use a datagridview, and offload the data to it.

It saves space, plus you can use less text boxes and buttons overall.
If you can find my tutorial, I wrote a step by step tutorial for an administration backend to a login system. It should be exactly what you need, as it uses the application database system (the vb.net sql server). If you want, I can PM you the link.

EDIT: just saw about the DGV, so, nvrm....post a few more details...for me atleast.

EDIT 2: as for cycling with the combo box, have it preform a check when you click a button for the desired action, and use a timer to check when it is changed to update the names and labels of everything.
 
well,

Okay, I could alter the actual Controls themselves...but I was utilizing the control of the individual "details" view of the specific tables. Not everyone is savvy using the DGV, which is fine, so I try to code for everyone. If someone prefers to use the DGV they can just hide the detailed controls, or if they find the DGV to annoying for their usage they can hide the DGV and use the detailed controls.

I've got the code written for the combobox, so don't worry about that...
here's the updated picture:
dbform2.jpg


On the right there are two DGV's that are for the "child" related tables, so they can see the items directly related to the current one. All of these facets of the form will change. Sometimes I'll need two child tables sometimes I'll only need one, so they are on a split containter which i can collapse one of the panels with a boolean.
the botom DGV is in another split container which is how I can hide the details or the bottom DGV based upon the user design.
The issue is that left panel with all the text boxes (mask-edits) that force a conformity of data entry for the users.

When the use selects a different table from the combo box up top, I want to change that panel. Now I was thinking that I would basically design 5 different Panels and then on the combobox change set them all Visible = False except the one that I want, at which point I also set the BindingSource's properties yadda yadda yadda. I was just wondering if there was a better way to handle those "Details View" entry panels through the use of a sliding page control or something. (Basically a tab control whose current tab is controlled in programmatic functions instead of with a Visible "Tab" at the top of the control)

Thanks
 
What would be the proper way to have multiple banks of controls, each bank, and to cycle through them based on a combobox value, or some other effect like that?
...
Now I was thinking that I would basically design 5 different Panels and then on the combobox change set them all Visible = False
Sounds like a job for UserControl.
 
Back
Top