PC Review


Reply
Thread Tools Rate Thread

Cntrol Creation

 
 
Vivek
Guest
Posts: n/a
 
      17th Oct 2008
Hello.. I want to create a control that resembles the "Properties"
window in Visual Studio. What is the best control I can use for that ?
I am using .NET 1.1 and winforms. Any help would be appreciated.
Thanks in advance.
 
Reply With Quote
 
 
 
 
Alberto Poblacion
Guest
Posts: n/a
 
      17th Oct 2008
"Vivek" <(E-Mail Removed)> wrote in message
news:acff3e82-92c8-462c-8952-(E-Mail Removed)...
> Hello.. I want to create a control that resembles the "Properties"
> window in Visual Studio. What is the best control I can use for that ?
> I am using .NET 1.1 and winforms.


Use a System.Windows.Forms.PropertyGrid control. This looks exactly the
same as the Properties window (and has the same capabilities) and is very
easy to use: just assign to the property SelectedObject a reference to the
object whose properties you want to show, and they appear in the control.
You can decorate with attributes the properties in your object to control
the way that they are displayed in the PropertyGrid.

 
Reply With Quote
 
Vivek
Guest
Posts: n/a
 
      17th Oct 2008
Thank you very much for your reply. My requirement is I need to have a
control with three columns, where the first column is a CheckBox,
second is normal column and third is a column which will have controls
based on the value in the second column
eg: chekbox Question1 CheckBox
checkbox Question2 TextBox
checkbox Question3 ComboBox
and so on... Can I create controls inside a ListBox or a ListView? How
can I do it..? Thanks in advance....
 
Reply With Quote
 
Alberto Poblacion
Guest
Posts: n/a
 
      17th Oct 2008
"Vivek" <(E-Mail Removed)> wrote in message
news:76bbea6a-d1c5-4630-bf03-(E-Mail Removed)...
> Thank you very much for your reply. My requirement is I need to have a
> control with three columns, where the first column is a CheckBox,
> second is normal column and third is a column which will have controls
> based on the value in the second column
> eg: chekbox Question1 CheckBox
> checkbox Question2 TextBox
> checkbox Question3 ComboBox
> and so on... Can I create controls inside a ListBox or a ListView? How
> can I do it..? Thanks in advance....


Ah, no, you can't the PropertyGrid for this purpose. It always displays
two columns, and the first one is always the name of each property.

If I have understood what you are describing, I think that a DataGrid
control would be the best for you, but you will have to do quite a bit of
work to sublass the DataGridColumnStyle for the third column, which needs to
host different controls depending on the value of another column.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Set association in cntrol panel Steve Cochran Windows Vista Mail 0 3rd Mar 2009 12:51 PM
Re: Set association in cntrol panel DL Windows Vista Mail 0 2nd Mar 2009 10:34 PM
How to add activeX cntrol to the web page Supriya Microsoft ASP .NET 3 20th Aug 2007 05:09 PM
Undue Cntrol+Z suddenly doesn't work.. bretsharon Microsoft Excel Misc 1 31st Mar 2007 02:10 AM
Form creation exception error; swapping delaying object creation? Fiona McBride Microsoft Dot NET 0 20th Apr 2004 09:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:51 PM.