[Closed] LV column header display?
I have a large scripted modifier. Lots going on in it that I can’t just post here. Problem is I’m using a listView and the column headers will not draw when the modifier panel is opened. They are there if you click on one and it refreshes the column header but will not do it on it’s own. I have tried .hide/.show, refresh(), invalidate(), update() and even hitting the monitor and I was sure that was going to work:S
Here is a test script that shows it only if you rollup any one of the rollouts. Just eval the script.
try(delete b)catch()
plugin modifier testMod
classId:#(0x72e8ee5c, 0x4f95c728)
name:"Test"
(
rollout roll01 "Roll01"
(
)
rollout testR "test"
(
dotNetControl lv "system.windows.forms.listView" width:160 height:100 offset:[-10,0]
fn initLv lv=
(
lv.gridLines=true
lv.view=lv.view.details
lv.fullRowSelect=true
lv.multiSelect=true
lv.columns.add "Constraint:" 90
lv.columns.add "Weight:" 66
if selection.count!=1 then constraintList.enabled=false
)
on testR open do
(
initLv lv
)
on testR rolledUp arg do
(
initLv lv
)
)
)
b=box()
t=testMod()
addModifier b t
select b
max modify mode
yep,
I confirm the redraw bug
you need to change to the create tab and back to modify tab to redraw it.
Even clearing and re-adding the columns in the rolledUp event does not redraw them…
What I think is happening is the on rolledUp event when opening is being called before the rollout is open so the rollout is being draw after the headers. The only way I have been able to get this to work is with a timer of all things. interval is set to 10 and I turn it off as soon as the initLv is called. But I need to turn it back on from every rollout in the tool.
Any one else have any other good ideas?
i had this issue adding my dotnet joystick to an attribute on the command panel. i tried everything you did except hitting the monitor. I will try that now.
I’m on 2009 with SP1/Ext1, with me it does drawboth headers when I first run the script. When I go to another panel and back it redraws fine. If I go up or down the stack and back it will not draw the first column header but the second does appear…
-Johan
That is odd. In my larger script it appears to have more problems. One thing that we did notice is if you have the first rollout long enough that it pushes the second into another column in the modifier panel, if you have it double wide that is it will draw.