Using the PropertyGrid
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts
Page 1 of 1
Hello,
How can I use the PropertyGrid control? Can anyone give an explanation of what it is for, how to use it, what you can do with it, etc.?
If you can't do the above, can you tell me how I can make it populate its property list to the properties of, for example, a label? Then let the user edit it, like its name, its text, etc?
This seems like a very interesting control and I really want to use it!
~GoodGuy17
How can I use the PropertyGrid control? Can anyone give an explanation of what it is for, how to use it, what you can do with it, etc.?
If you can't do the above, can you tell me how I can make it populate its property list to the properties of, for example, a label? Then let the user edit it, like its name, its text, etc?
This seems like a very interesting control and I really want to use it!
~GoodGuy17

http://msdn.microsoft.com/en-us/library ... ygrid.aspx
Basically this is like the properties window you see on the bottom right of the IDE window, it is a control that you can place onto the form to see the properties of other objects (e.g. other controls or classes).
Basically this is like the properties window you see on the bottom right of the IDE window, it is a control that you can place onto the form to see the properties of other objects (e.g. other controls or classes).
Code: Select all
Dim pg As PropertyGrid = New PropertyGrid()
Private Sub NumericUpDown1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDown1.ValueChanged
pg.SelectedObject = Me.Controls(Convert.ToInt32(NumericUpDown1.Value))
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
NumericUpDown1.Maximum = Me.Controls.Count
pg.Top = NumericUpDown1.Top
pg.Left = NumericUpDown1.Right
pg.Width = 300
pg.Height = 300
Me.Controls.Add(pg)
End Sub
Thanks! Dude! You are one of the bests at VB/VS! I GOOGLED THIS AND DIDN'T GET A SINGLE EASY ANSWER! Omigod! Thanks!
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023