[Closed] DotNet Listview checkboxes fullRowSelect
Hello! I have problem with DotNet Listview fullRowSelect.
Problem is fully described in this thread http://forums.cgsociety.org/showthread.php?t=598014 http://forums.cgsociety.org/showthread.php?t=59801 4″ rel=”nofollow noopener”> also this thread contains solution… but with alot of items in listview this solution works very slow
I’m just learning to use DotNet, so find better solution by yourself is complicated, please help.
p.s. Plan “B” not use fullRowSelect at all…
just add a simple logic:
try(destroydialog ListViewTest)catch()
rollout ListViewTest "" width:410 height:410
(
dotNetControl lv "ListView" width:400 height:400 align:#center pos:[5,5]
on ListViewTest open do
(
lv.View = lv.View.Details
lv.HideSelection = off
lv.FullRowSelect = on
lv.CheckBoxes = on
lv.BackColor = (dotnetclass "System.Drawing.SystemColors").Menu
lv.Columns.Add "Items" 100
lv.Columns.Add "Index" 100
lv.Columns.Add "Hash" 100
for k=1 to 50 do
(
item = lv.Items.Add ("Item." + formattedprint k format:"02d")
item.SubItems.AddRange #(k as string, (gethashvalue item.text 0) as string)
)
)
local selmode = off
local anydown = 0
on lv ItemSelectionChanged s e do if e.IsSelected do selmode = on
on lv ItemCheck s e do if selmode do e.NewValue = e.CurrentValue
on lv KeyDown s e do anydown = bit.set anydown 1 on
on lv MouseDown s e do enydown = bit.set anydown 2 on
on lv KeyUp s e do if (anydown = bit.set anydown 1 off) == 0 do selmode = off
on lv MouseUp s e do if (anydown = bit.set anydown 2 off) == 0 do selmode = off
)
createDialog ListViewTest
that’s why programmers use brain sometimes, not just a skill
denisT thank you! You are the best of the best
So, to be clear, this is really bug of listview? For me its looks like bug.
p.s. Oh brain… sometimes it’s really hard to use it, but I will try…
yes. it’s a bug. i can’t see any reason for this control behavior. i never tried it outside the max. maybe it’s specific just for max only.