Design time properites in user control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a user control that inherits the standard listview. I want to add a couple properties that should be available in the designer, but haven't the fogiest idea how. Please help

Thanks
Eric Fleet
 
Hi Eric,

One halfour ago distributed by Herfried, K Wagner

<http://www.codeproject.com/cs/miscctrl/#TreeView+Controls>

Someone has proposed his company to give a credit card from the company

:-)

Cor

"> I am creating a user control that inherits the standard listview. I want
to add a couple properties that should be available in the designer, but
haven't the fogiest idea how. Please help!
 
Hi Eric,

If you wanted a Simple Answer!

Just add a Property to your inheriting class.

Public Class MyObj
Inherits ListView

Private _myProp as Object


Public Property MyProp as Object
Get
Return _myProp
End Get
Set (Value as Object)
_myProp = Value
End Set
End Property

End Class

My Property will now be visible in the Designer, after compiled of course..

Also you can add and checkout

Imports System.ComponentModel

Then above your property type <

This will present a list of things you can assign for your property,
Some usefull one's from the designer's point of view are, DefaultValue,
Browsable, Category

There should be some doc under ComponentModel.

If you need any more help then please ask.
Rigga.

Eric Fleet said:
I am creating a user control that inherits the standard listview. I want
to add a couple properties that should be available in the designer, but
haven't the fogiest idea how. Please help!
 
Thank you much! I thought I had done this a couple times... I wonder if I forgot to recompile :)

At any rate, late me tell you something else I am trying to do: in my extended listview, I would like to use extended column headers, and add them at design timejust like you would through ColumnHeaders Collection Property (click on the elipses by 'Columns' in the properties window). If I drop my extended listview onto a test form, and click on the columns elipses, I can add a normal listview header... how to make it add an extended listview header?

I have set up an eColumnHeader class... but confused where to go from here.

Any help would be appreciated.

Thanks,
Eric
 
Hi Eric,

there is a good tutorial here,
http://www.divil.co.uk/net/articles/designers/collectioncontrols.asp

HTH.

Rigga.

Eric Fleet said:
Thank you much! I thought I had done this a couple times... I wonder if I forgot to recompile :)

At any rate, late me tell you something else I am trying to do: in my
extended listview, I would like to use extended column headers, and add them
at design timejust like you would through ColumnHeaders Collection Property
(click on the elipses by 'Columns' in the properties window). If I drop my
extended listview onto a test form, and click on the columns elipses, I can
add a normal listview header... how to make it add an extended listview
header?
 
Back
Top