Grouping Controls in Pairs vb.net windows.forms - Dynamic List in grid format - vb.net

I have pairs of controls: immagebox + textbox = one pair.
I want these to show up in a single column grid/tabular format. Each cell contains one image/text pair.
I want this grid to scroll because the number of pairs is dynamic depending on a user selection.
I suppose I will be adding these controls in code at runtime when the user makes his/her selection.
What is the best way to accomplish that in vb.net? TableLayoutPanel or better way?

One possible approach is the following.
Use a Panel as your container. Inside this Panel you can add a TableLayoutPanel that is defined to be AutoSize=True. Add two columns to your table layout and then add controls in rows as needed. The TableLayoutPanel will then size itself automaticlly depending on the contents.
Now make your Panel be AutoScroll=True and it will automatically add the correct scrollbars so the user can move around and see the contained set of controls.

Related

Programmatically know if a control (or empty cell) is merged in Access Form

I'm working with MS Access VBA, an I have an stacked design in a form (the yellow grid).
it's possible to know (programmatically) if a control (or empty cell) is in merged cell or not?
Thanks.
These are not cells, these are controls (labels, textboxes, comboboxes, etc). Controls are not merged. What you see is a grouped layout. Controls are associated as a group and controls will move together if you grab and drag the box in upper left. Resize width of one control and you resize all in same "column"; resize height and you resize all in same "row". Forms and reports built by Access wizards default to grouped layout. To remove grouping: select a group > right click > Layout > Remove layout.
To determine the layout type of a control, reference its Layout property.
Me.controlname.Layout
0 = not grouped
1 = tabular
2 = stacked

Infragistics Child Band Column hiding

Is it possible to display different column totals for child bands using Infragistics?
For example, say I want my grid to look like the following:
Is this possible? I've found that child bands tend to affect the entire grid, so when I hide a column of the child band (for example "Week + 2") all of those child columns are hidden.
this is a quote from their KB
The Hidden property determines whether an object is visible. Hiding an object may have have effects that go beyond simply removing it from view. For example, hiding a band also hides all the rows in that band. Also, changing the Hidden property of an object affects all instances of that object. For example, a hidden column or row is hidden in all scrolling regions.
which is located here
Ultragrid Hidden Property
so i guess this is not possible
you could try to accomplish this with a tree though

vb net: zoom in designer

I was searching google for a way to size the form and the controls with it and came across something that mentioned Control.scale. How do I use the control.scale method to size everything down to the way I want it.
Also, is there a way I can zoom the form out in the designer. I want to create a 1280X800 form, but my screen is 1024X768. I want to be able to zoom out to see the entire form wile still having it's size be 1280X800.
You can use tablelayout panel in order to fit your form in all resolutions.similary a property called anchor, which is also need to be assigned for the controls inside tablelayout panel according to your requirement [top,bottom,left,right] to achieve the same.
By the way you have to use percentage for setting the column's width and row's height in that.
Simply, this way of designing is called as fluid designing.
Table layout panel

Increasing the space inside a windows form

I am trying to populate my windows form with new controls and data based on what is read from my database. The left side of the form is a static panel which will not need re sizing but I need to create multiple labels on the right side which requires more space. I added the vscroll control but am having trouble increasing the size of the right side of the form.
To use a scroll-bar will require a semi-low-level implementation where you need to always update the view by repositioning the elements, calculating your scroll-bar in relation to total view, what elements would be visible and so forth.
A better solution in this case will probably be to add a Panel control on the right which is docked (f.ex. Fill) and then set the AutoScroll property to True.
This way you leave all the "low level" stuff to the Panel control and you can add and position the elements you need to the Panel's Controls collection instead.

Is there an easy way in VB.Net to have dynamic number of panels can be created like text in listview?

I want to have dynamic number of panels displayed on the screen. Its like creating listview of panels. I would like something that would allow me to use .add and .remove operators to add and remove panels from listview or some other control. Is there anything out there right now in vb.net?
It sounds like you are referring to the FlowLayoutPanel, which you can use to add any controls to it (in your case, more panels).