christoph.buehne wrote:

> How can i create a new list item in a bar with powerpro script ?
> 

First you create a list, if it doesn't already exist.

cl.Create(clname)  or  cl.Create(clname,1)
Creates a new Command List with name given by the clname expression. The 
command list must not 
already exist unless the second argument is specified and set to 1, in which 
case, if the list exists, it is 
re-used but all of its items are removed by the call to create. Returns 1 if 
successful, empty string 
otherwise.

Example:
cl.Create("MyList",1)

If it's a new list you may want to set some of its properties.

cl.SetProperties(clname, proplines)
Replaces properties for clname with those given in proplines, which should be a 
multi-line string (using 
\r as the line separator) following the same format as the [Properties] section 
of the text configuration 
ini files.

Example:
cl.SetProperties(“MyList”, “Format1=showasbar barsize \r active=20”)

many more properties can be set, see also cl.AddProperties

Then you insert items.

cl.Insert(clname, clindex)
Inserts a empty item before position clindex. To add a new item to the end, 
specify clindex as cl.length
(clname). The function returns 1 if successful, empty string if command list 
would be too long (>1000 
elements) after the insert.

Example:
cl.Insert("MyList",0)      ; inserts an empty item at the beginning of the list

and set item properties, most notably actions that get associated to pressed 
bar buttons or selected 
menu entries

cl.AddLeft(clname, clindex, command, parameters, work, how)
Adds the specified command to the commands already present for command list 
clname, item clindex. 
The command, parameters, work, and how parameters are all optional, except that 
the command must 
be specified if any of the others are specified. The clindex must be less than 
the length. If there is no 
room for the command, null string is returned; otherwise “1” is returned.
Or use cl.AddRight for right command, cl.AddMiddle for middle.

Example:
cl.AddLeft(“MyList”, 1, “Menu”, “Show MyMenu”, “centerscreen”)

of course MyMenu must exists as a command list or you'll get an error when you 
press the bar button.

For more information you really need to read the help file, the section 
regarding command list (CL) 
functions is very well done, start from topic "Overview of CL functions", which 
you can also open 
directly from a command-prompt window by typing

winhlp32 -I cl_overview c:\path\to\powerpro\POWERPRO.HLP



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to