Notifications
Clear all

[Closed] Parameter Blocks: Dotnet ListView Items in a Scripted plugin?

Hi guys,
Hope to get some help…I’m a little stuck here.
I am making a Thinking Particles script operator, which is a scripted plugin clause.

I’ve incorporated a DotNet Listview,populated with a list of cache files in the rollout. The problem is when I deselect the TP node then select it again all the ListView items disappear in the rollout.

How would i go about writing the listview items in the parameters main rollout,so the values stick?

I am amusing this is what is needed, I’m new to dotnet and scripted plugins.
Cheers
-Alex

11 Replies
 lo1

try a stringTab parameter in your paramblock, writing to it on rollout close and reading from it on rollout open.

Thanks lo,
Though, I’m still a bit confuse on what to actually put for the:
[color=Red]<name>[/color] type:#stringTab tabSize: tabSizeVariable:true ui:

I'm getting a Compile error:
UI item array size does not match tabSize: specified in  lv
when using:
lv type:#stringTab tabSizeVariable:true  ui:lv
I take it tabSize is the array count? I'm a bit confused as to where the listview is storing the array.

Cheers

see Scripted Plug-in Clauses
a .net control can’t be linked to any parameter of param block.

Bummer…
Thanks Denis

 lo1

You can not automatically link the listviewitems to the stringtab. You will need to write functions to read relevant information from the listview adn write it into the stringTab.
These functions should be called on the rollouts open/close events.
you should start with a tabSize of zero and set tabSizeVariable:true

Ah I see now
by writing to an array using #stringTab , then using a fn to test and populate the the Listview on a rollout open event.

Thanks guys

 lo1

test what? You can assume the listview will always be empty on the rollout open event.

well this is a thinking particles node,it will be selected and deselected many times, causing the rollout to open and close each time.

I was going to make a fn to test if the user has already populated the list previously on a open rollout event handler.

Am i going about it wrong? Is there an easier way to go about it?
Thanks

1 Reply
 lo1
(@lo1)
Joined: 11 months ago

Posts: 0

Didn’t you say that when the user deselects the node the listview is reset?


parameters main 
(
 strTab type:#stringTab tabSize:0 tabSizeVariable:true  
)

rollout mainRol
(
 dotnetcontrol lv "ListView" etc....

 on mainRol open do populateLvFromStrTab()
 on mainRol close do writeLvItemsToStrTab()
)

All working now
Thanks again for your help
-Alex

Page 1 / 2