Dotnetclass "system. Windows. Forms. View ").

Source: Internet
Author: User

 
If (splitviewrolout! = Undefined) and (splitviewrolout. isdisplayed) Do (destroydialog splitviewrolout)
Global splitviewrolout
Rolout splitviewrolout "modifiers"
(
-- Treeview
FN inittreeview TV =
(
TV. checkboxes = true
TV. Sorted = true
)
FN addmodifiers thenode themodifiers =
(
For m in themodifiers do
(
Newnode = thenode. nodes. Add M. Name
Newnode. Tag = dotnetmxsvalue m
Newnode. Checked = M. Enabled
)
)
FN addobjects thenode theobjects =
(
For C in theobjects do
(
Newnode = thenode. nodes. Add C. Name
Newnode. Tag = dotnetmxsvalue C
Newnode. Checked = Not C. ishidden
Newnode. forecolor = (dotnetclass "system. Drawing. Color"). fromargb 200 0 0

Addmodifiers newnode C. Modifiers
)
)
FN fillintreeview TV =
(
Theroot = TV. nodes. Add "(objects )"
Rootnodes = for o in objects collect o
Addobjects theroot rootnodes
)
-- Listview
FN initlistview Lv =
(
LV. gridlines = true
LV. view = (dotnetclass "system. Windows. Forms. View"). Details
LV. fullrowselect = true

Layoutdef = # ("property", 120), # ("value", 60 ))

For I in layoutdef do (LV. Columns. Add I [1] I [2])
)
FN fillinspreadsheet Lv =
(
LV. Items. Clear ()
Therange = #()

If selection. Count = 1 and mynode! = Undefined do
(
Propnamesarray = getpropnames mynode

For I = 1 to propnamesarray. Count do
(
Li = dotnetobject "system. Windows. Forms. listviewitem" (propnamesarray [I]) as string)
Sub_li = Li. subitems. Add (getproperty mynode propnamesarray [I]) as string)
 
Append therange Li
)
LV. Items. addrange therange
)
)
 
Dotnetcontrol TV "Treeview" width: 290 Height: 490 pos: [5, 5]
Dotnetcontrol lv_properties "system. Windows. Forms. listview" width: 290 Height: 490 pos: []
 
On TV click Arg do
(
Hitnode = TV. getnodeat (dotnetobject "system. Drawing. Point" Arg. x Arg. Y)

If hitnode! = Undefined do
(
Try
(
If superclassof hitnode. Tag. value = modifier then (select hitnode. Parent. Tag. value)
Else (select hitnode. Tag. value)
 
Global mynode = hitnode. Tag. Value
)
Catch (max select none)

Fillinspreadsheet lv_properties
)
)
On splitviewrolout open do
(
Inittreeview TV
Fillintreeview TV

Initlistview lv_properties
Fillinspreadsheet lv_properties
)
)
Createdialog splitviewrolout 600 525 style: # (# style_sysmenu, # style_titlebar, # style_toolwindow)
Callbacks. addscript # prenodegeneralpropchanged "splitviewrolout. fillinspreadsheet splitviewrolout. lv_properties"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.