File: wx.propgrid.PropertyGridManager.1.py

package info (click to toggle)
wxpython4.0 4.2.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 218,584 kB
  • sloc: cpp: 962,669; python: 231,226; ansic: 170,755; makefile: 51,757; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (28 lines) | stat: -rw-r--r-- 977 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

    pgMan = wx.propgrid.PropertyGridManager(
        parent,
        PGID,
        # These and other similar styles are automatically
        # passed to the embedded wx.PropertyGrid.
        style = wx.PG_BOLD_MODIFIED|wx.PG_SPLITTER_AUTO_CENTER|
        # Include toolbar.
        wx.PG_TOOLBAR |
        # Include description box.
        wx.PG_DESCRIPTION |
        # Include compactor.
        wx.PG_COMPACTOR |
        # Plus defaults.
        wx.PGMAN_DEFAULT_STYLE
      )

    page = pgMan.AddPage("First Page")
    page.Append(wx.propgrid.PropertyCategory("Category A1"))
    page.Append(wx.propgrid.IntProperty("Number", wx.propgrid.PG_LABEL, 1))
    page.Append(wx.propgrid.ColourProperty("Colour",wx.propgrid.PG_LABEL, wx.WHITE))

    page = pgMan.AddPage("Second Page")
    page.Append("Text", wx.propgrid.PG_LABEL, "(no text)")
    page.Append(wx.propgrid.FontProperty("Font",wx.propgrid.PG_LABEL))

    # Display a header above the grid
    pgMan.ShowHeader()