Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, I'm trying to make a Tab usercontrol (a control with multiple pages from which one can be active at a moment). I have two problems regarding this control:

1. I can't make it respond to click events in design view (I want to be able to place controls on each page in design).

2. I use an ArrayList to keep the TabPages collection, and when I exposed this ArrayList with a property, in the PropertyGrid the word (Collection...) appears near the property, but when I edit it it doesn't show the properties for the pages (it sees the Array Elements as simple objects).

 

Do you know what needs to be done in order for this to work properly?

  • Administrators
Posted
Is there any reason why you couldn't use the built in tab control? If you want to interact with the property grid then you will need to look at creating a custom TypeConverter - search MSDN for some examples (in fact you may find some in our tutor's corner or code library sections).

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
Is there any reason why you couldn't use the built in tab control? If you want to interact with the property grid then you will need to look at creating a custom TypeConverter - search MSDN for some examples (in fact you may find some in our tutor's corner or code library sections).

 

The built-in tab control cannot be customized to look the way I want it to.

 

I will search the locations you specified for some examples on using Type Converters.

 

Thank you for your post.

Posted
Hi, I'm trying to make a Tab usercontrol (a control with multiple pages from which one can be active at a moment). I have two problems regarding this control:

1. I can't make it respond to click events in design view (I want to be able to place controls on each page in design).

you'd need to write a class derived from ControlDesigner for your control.. for an example see the Magic Library and their implementation of a custom tab-control... (you can download it here - once you installed it you have their sources..)

 

2. I use an ArrayList to keep the TabPages collection' date=' and when I exposed this ArrayList with a property, in the PropertyGrid the word (Collection...) appears near the property, but when I edit it it doesn't show the properties for the pages (it sees the Array Elements as simple objects).[/quote']

Don't use an Arraylist - use your own class derived from CollectionBase!! from that you get such nice features as notification on adding or removing items to/from the collection... (also see the magic-library..) for the collection-issue you might also want to take a look at divil's-article...

 

happy coding!

 

Andreas

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...