Gravey
10-29-2009, 06:14 AM
does anyone else have a problem setting the backcolor of the XtraTreeList control? i can set the backColor and when i check its .R .G .B properties it returns the correct values but the background of the control just stays white... maybe i'm missing a flag somewhere?
example code: global testRoll
try(DestroyDialog testRoll)catch()
rollout testRoll "testRoll"
(
dotnetcontrol tv "DevExpress.XtraTreeList.TreeList" width:204 height:300 pos:[0,0]
label lab_color1 "TreeList.BackColor is:" align:#left
label lab_color2 ""
fn addColumn caption width visible:true fixedSide:undefined =
(
local col = tv.Columns.Add()
col.caption = caption
col.width = width
col.visible = visible
if fixedSide != undefined do col.Fixed = getProperty col.Fixed fixedSide
col.optionsColumn.AllowEdit = false
col.optionsColumn.AllowMove = false
col.optionsColumn.AllowSize = false
col.optionsColumn.AllowSort = false
col
)
fn initTreeList =
(
-- Set up the treelist
tv.OptionsBehavior.Editable = false
tv.OptionsBehavior.ResizeNodes = false
tv.OptionsMenu.EnableColumnMenu = false
tv.OptionsView.ShowIndicator = false
-- add the columns
tv.BeginUpdate();
addColumn "col 1" 100
addColumn "col 2" 50
addColumn "col 3" 50
tv.EndUpdate()
local c = colorMan.GetColor #background * 255
tv.backColor = tv.backColor.fromARGB c.x c.y c.z
format "%\n" (tv.BackColor.ToString())
lab_color2.text = tv.BackColor.ToString()
)
fn UpdateTreeList =
(
tv.Nodes.Clear()
tv.BeginUnboundLoad()
for i = 1 to 3 do
(
root = local root = tv.AppendNode #("root " + i as string, "", "") -1
for j = 1 to (random 1 3) do
tv.AppendNode #("sub " + j as string, "x", "y") root
)
tv.ExpandAll()
tv.EndUnboundLoad()
)
on testRoll open do
(
clearListener()
initTreeList()
UpdateTreeList()
)
)
createDialog testRoll width:204
example code: global testRoll
try(DestroyDialog testRoll)catch()
rollout testRoll "testRoll"
(
dotnetcontrol tv "DevExpress.XtraTreeList.TreeList" width:204 height:300 pos:[0,0]
label lab_color1 "TreeList.BackColor is:" align:#left
label lab_color2 ""
fn addColumn caption width visible:true fixedSide:undefined =
(
local col = tv.Columns.Add()
col.caption = caption
col.width = width
col.visible = visible
if fixedSide != undefined do col.Fixed = getProperty col.Fixed fixedSide
col.optionsColumn.AllowEdit = false
col.optionsColumn.AllowMove = false
col.optionsColumn.AllowSize = false
col.optionsColumn.AllowSort = false
col
)
fn initTreeList =
(
-- Set up the treelist
tv.OptionsBehavior.Editable = false
tv.OptionsBehavior.ResizeNodes = false
tv.OptionsMenu.EnableColumnMenu = false
tv.OptionsView.ShowIndicator = false
-- add the columns
tv.BeginUpdate();
addColumn "col 1" 100
addColumn "col 2" 50
addColumn "col 3" 50
tv.EndUpdate()
local c = colorMan.GetColor #background * 255
tv.backColor = tv.backColor.fromARGB c.x c.y c.z
format "%\n" (tv.BackColor.ToString())
lab_color2.text = tv.BackColor.ToString()
)
fn UpdateTreeList =
(
tv.Nodes.Clear()
tv.BeginUnboundLoad()
for i = 1 to 3 do
(
root = local root = tv.AppendNode #("root " + i as string, "", "") -1
for j = 1 to (random 1 3) do
tv.AppendNode #("sub " + j as string, "x", "y") root
)
tv.ExpandAll()
tv.EndUnboundLoad()
)
on testRoll open do
(
clearListener()
initTreeList()
UpdateTreeList()
)
)
createDialog testRoll width:204
