Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to have sub-properties in a custom control? Pin
Meysam Mahfouzi13-Aug-03 17:46
Meysam Mahfouzi13-Aug-03 17:46 
GeneralRe: How to have sub-properties in a custom control? Pin
Nick Parker14-Aug-03 2:08
protectorNick Parker14-Aug-03 2:08 
GeneralRe: How to have sub-properties in a custom control? Pin
Alvaro Mendez13-Aug-03 5:32
Alvaro Mendez13-Aug-03 5:32 
AnswerRe: How to have sub-properties in a custom control? Pin
Nnamdi Onyeyiri13-Aug-03 0:52
Nnamdi Onyeyiri13-Aug-03 0:52 
GeneralRe: How to have sub-properties in a custom control? Pin
Alvaro Mendez13-Aug-03 5:26
Alvaro Mendez13-Aug-03 5:26 
AnswerSolution! Pin
Alvaro Mendez13-Aug-03 5:08
Alvaro Mendez13-Aug-03 5:08 
Generaladding sub items Microsoft example doesnt work Pin
Ista12-Aug-03 11:58
Ista12-Aug-03 11:58 
GeneralRe: adding sub items Microsoft example doesnt work Pin
Csharp™12-Aug-03 15:08
Csharp™12-Aug-03 15:08 
straight from msdn....
          // Create ListView items to add to the control.<br />
           ListViewItem listViewItem1 = new ListViewItem(new string[] {"Banana","a","b","c"}, -1, Color.Empty, Color.Yellow, null);<br />
           ListViewItem listViewItem2 = new ListViewItem(new string[] {"Cherry","v","g","t"}, -1, Color.Empty, Color.Red, new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((System.Byte)(0))));<br />
           ListViewItem listViewItem3 = new ListViewItem(new string[] {"Apple","h","j","n"}, -1, Color.Empty, Color.Lime, null);<br />
           ListViewItem listViewItem4 = new ListViewItem(new string[] {"Pear","y","u","i"}, -1, Color.Empty, Color.FromArgb(((System.Byte)(192)), ((System.Byte)(128)), ((System.Byte)(156))), null);<br />
     <br />
         //Initialize the ListView control and add columns to it.<br />
           this.listView1 = new ListView();<br />
<br />
           // Set the initial sorting type for the ListView.<br />
           this.listView1.Sorting = SortOrder.None;<br />
           // Disable automatic sorting to enable manual sorting.<br />
           this.listView1.View = View.Details;<br />
           // Add columns and set their text.<br />
           this.listView1.Columns.Add(new ColumnHeader());<br />
           this.listView1.Columns[0].Text = "Column 1";<br />
           this.listView1.Columns[0].Width = 100;<br />
           listView1.Columns.Add(new ColumnHeader());<br />
           listView1.Columns[1].Text="Column 2";<br />
           listView1.Columns.Add(new ColumnHeader());<br />
           listView1.Columns[2].Text="Column 3";<br />
           listView1.Columns.Add(new ColumnHeader());<br />
           listView1.Columns[3].Text="Column 4";<br />
           // Suspend control logic until form is done configuring form.<br />
           this.SuspendLayout();<br />
           // Add Items to the ListView control.<br />
           this.listView1.Items.AddRange(new ListViewItem[] {listViewItem1,<br />
                                                                listViewItem2,<br />
                                                               listViewItem3,<br />
                                                               listViewItem4});<br />
           // Set the location and size of the ListView control.<br />
           this.listView1.Location = new Point(10, 10);<br />
           this.listView1.Name = "listView1";<br />
           this.listView1.Size = new Size(300, 100);<br />
           this.listView1.TabIndex = 0;<br />
           // Enable editing of the items in the ListView.<br />
           this.listView1.LabelEdit = true;<br />
           // Connect the ListView.ColumnClick event to the ColumnClick event handler.<br />
           this.listView1.ColumnClick += new ColumnClickEventHandler(ColumnClick);<br />
               <br />
           // Initialize the form.<br />
           this.AutoScaleBaseSize = new Size(5, 13);<br />
           this.ClientSize = new Size(400, 400);<br />
           this.Controls.AddRange(new Control[] {this.listView1});<br />
           this.Name = "ListViewSortForm";<br />
           this.Text = "Sorted ListView Control";<br />
          // Resume layout of the form.<br />
           this.ResumeLayout(false);<br />
      }<br />


hope it helps.


Csharp™  the coder formally known as dynamic


Me.twins.duedate = DateTime.Now.AddDays(+16).ToLongDateString
Me.Birthday = DirectCast(Me.twins.DueDate, DateAndTime.SameDay)


GeneralRe: adding sub items Microsoft example doesnt work Pin
Ista12-Aug-03 15:45
Ista12-Aug-03 15:45 
Generaldatagrid column widths Pin
mikemilano12-Aug-03 10:57
mikemilano12-Aug-03 10:57 
GeneralRe: datagrid column widths Pin
Ista12-Aug-03 11:56
Ista12-Aug-03 11:56 
GeneralRe: datagrid column widths Pin
mdolby13-Aug-03 5:12
mdolby13-Aug-03 5:12 
GeneralRe: datagrid column widths Pin
Ista13-Aug-03 13:28
Ista13-Aug-03 13:28 
GeneralSetting Environment Variables with C# Pin
Jonathan Guidry12-Aug-03 9:42
Jonathan Guidry12-Aug-03 9:42 
GeneralRe: Setting Environment Variables with C# Pin
Nnamdi Onyeyiri13-Aug-03 0:55
Nnamdi Onyeyiri13-Aug-03 0:55 
GeneralRe: Setting Environment Variables with C# Pin
Alvaro Mendez13-Aug-03 5:50
Alvaro Mendez13-Aug-03 5:50 
GeneralRe: Setting Environment Variables with C# Pin
Jonathan Guidry13-Aug-03 6:54
Jonathan Guidry13-Aug-03 6:54 
GeneralRe: Setting Environment Variables with C# Pin
Alvaro Mendez13-Aug-03 7:37
Alvaro Mendez13-Aug-03 7:37 
GeneralRe: Setting Environment Variables with C# Pin
Ista13-Aug-03 13:29
Ista13-Aug-03 13:29 
GeneralPress Enter In Data Grid &amp; Trigger Button Outside Pin
mikemilano12-Aug-03 9:34
mikemilano12-Aug-03 9:34 
GeneralRe: Press Enter In Data Grid &amp; Trigger Button Outside Pin
Ista12-Aug-03 11:57
Ista12-Aug-03 11:57 
QuestionAccessing xml help in 3rd party lib..?? Pin
vlusardi12-Aug-03 7:23
vlusardi12-Aug-03 7:23 
AnswerRe: Accessing xml help in 3rd party lib..?? Pin
Heath Stewart12-Aug-03 8:25
protectorHeath Stewart12-Aug-03 8:25 
Generaltrigger button click method from code Pin
mikemilano12-Aug-03 6:38
mikemilano12-Aug-03 6:38 
GeneralRe: trigger button click method from code Pin
Nnamdi Onyeyiri12-Aug-03 7:22
Nnamdi Onyeyiri12-Aug-03 7:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.