Author Topic: settings form? propertygrid  (Read 679 times)

jasoncircello@gmail.com

  • Newbie
  • *
  • Posts: 3
    • View Profile
settings form? propertygrid
« on: August 20, 2019, 06:20:08 PM »
I am new to VS .This may seem Basic.    I  Love the ease of use of AdvancedHMI. 


 I am trying to place a propertygrid on page2  that will serve as a settings page for the gauges or meters on the MainForm.   Is this possible?   I have searched to no avail.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5268
    • View Profile
    • AdvancedHMI
Re: settings form? propertygrid
« Reply #1 on: August 20, 2019, 07:10:59 PM »
This is possible, but can grow into something complex.

I will give an example in its simplest form:

- In Solution Explorer, double click Page2.vb
- From the Toolbox, add a PropertyGrid
- In Solution Explorer, double click MainForm
- From the Toolbox, add a BasicLabel
- From the Toolbox, add a button
- Double click the button and add this code:

Code: [Select]
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Page2.PropertyGrid1.SelectedObject = BasicLabel2
        Page2.Show()
    End Sub

When you run the program and click the button, you can now adjust the properties of the BasicLabel

jasoncircello@gmail.com

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: settings form? propertygrid
« Reply #2 on: August 20, 2019, 07:22:24 PM »
Thanks, this exactly what i am looking for.     I appreciate all you do