remove levels from List
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



remove levels from List Expand / Collapse
Author
Message
Posted 9/3/2007 4:55:25 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 10/6/2008 9:19:56 AM
Posts: 13, Visits: 40
I need to remove levels which I added via script, how do I do that? The list is later recalled and filled with other items

thanks,

a.

Post #595
Posted 9/4/2007 8:52:40 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Yesterday @ 9:26:59 AM
Posts: 576, Visits: 1,254
There is currently only the abilty to add levels at runtime.  However, if you run the following script, you essentially start with a blank List object.

Dim x As Long
For x = 1 To MyList.Size

     MyList.SetWeight x, 0

Next 'x

Then you can populate the List again.  You will just need to setup the Order and Deletion objects again (search for your List object in Full script and copy/paste that section).  Note that you would want to peform something like the following to ensure you have enough rows and you are not adding rows you do not need.

If MyList.Size < x Then MyList.AddLevel x

MyList.SetWeight x, 1
MyList.SetProc x, "MyProcedure",
MyList.SetAttrib x, "MyAttrib", "MyValue"

-Brandon

Post #603
Posted 9/5/2007 4:27:01 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 10/6/2008 9:19:56 AM
Posts: 13, Visits: 40
ok, this is not exactly what i was looking for, but if the function to delete rows is not hardcoded I think I have no other choice. Let me try and adjust to my script.

While you are there can you explain me the purpose of the Deletion/NoDeletion obeject because it's not clear reading the help. When should be used? What does exactly do?

thanks,

a.

Post #608
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 12:54am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.125. 12 queries. Compression Disabled.