Inherited User control - listview
Hiya
Basically what i'm planning to do is create a 'custom' listview control that behaves like a very basic grid.
I.e. i can specify a cell reference (row, col) with something like
VB Code:
me.listgridview.CellValue(1, 2) = strValue
OR i can specify the font of the cell etc...
Basically this is just manipulation of the listitems and subitems. At the moment i am just using a listview within my project and manipulate the list/subitems as i go along, so i've got the basic code.
Problem is i haven't a clue about how to setup a user control in vb.net
Is this a "inherited user control" or just a "user control"? the terminology has confused me a bit!
could anyone give me some advice about how to set up a "inherited user control" or a "user control"
cheers
Re: Inherited User control - listview
Quote:
Originally Posted by SaraL
Hi!
A "user control" inherits from System.Windows.Forms.UserControl. You create them with Add->Add User Control. This will give you a surface similar to a form where you can add controls from the toolbox, just like you do on a form. After the project is built, the control should appear in the toolbox and you can use it in your forms.
A "inherited user contol" works in the same way, but is inherited from a user control that already exists (created by you).
Then there is also something called "custom control" that inherits directly from a control. A custom textbox would inherit from System.Windows.Forms.TextBox. This is useful when you for example want to create a textbox that only accepts integers as input. A custom control is created with Add->Add New Item, and then you select "Custom Control". After the control is created you use "Customize toolbox" to make it visible in the toolbox.
So if you want to create a control that contains various labels, textboxes etc you use "user control". If you want to create a control that is a textbox or a label etc you use a "custom control".
I've never used the listview control, so I don't know what it does and what you want it to do. But it seems like what you want is a custom control.
The terms "user control" and "custom control" are often mixed and you end up very confused when searching for information about this. User control is also sometimes called "Composite control"
/Sara
Where is this 'customize toolbox' option again? I'm not seeing it anywhere in the .net 2003 ide
Re: Inherited User control - listview