--- In [email protected], Vochomurka <[EMAIL PROTECTED]> wrote:
>
> > The *control label allows you to set the initial value of the
> > checkbox (an any other control). After you hide the bar but
> > before you close it, read the state and change the *control label
> > with cl.setlabel and string manipulation to set the initial value
> > you want for the next time you open the bar. Then close and
> > export it. I also think that tool tips are not shown for control
> > so you could stash information using cl.settooltip.
>
> Yes, these solution are not much more handy than mine. Thanks
> anyway.
You could update the label as part of the left command that changes
the state of the checkbox.
A working example (provided backlash is the escape character). Create
the following two files (testcheckboxes.powerpro and
testcheckboxes.ini). To test run testcheckboxes.powerpro, change
values, use the Export and Close button. Then rerun and change values
again.
Regards,
Sheri
;start of testcheckboxes.powerpro -- put in pprofolder++?"\scripts"
cl.Import(pprofolder++"testcheckboxes.ini")
Bar.Show("testcheckboxes")
quit
Function ChangeLabel(id)
cl.setlabel("testcheckboxes", ;;+
cl.getidindex("testcheckboxes", id), ;;+
regex.pcrereplace(?" \(\d\)|$", ;;+
cl.getlabel("testcheckboxes", ;;+
cl.getidindex("testcheckboxes",id)), ;;+
?" ("++cl.getctrlvalue("testcheckboxes",id)++?")", "", 1))
;end of testcheckboxes.powerpro
below is initial testcheckboxes.ini -- put in pprofolder
[testcheckboxes:Properties]
Format1 = IconSize: 16 Position: FixedRightCenter
Format2 = MaxText: 531
Format3 = Flat
Format4 = TopMost Border AllVDesks 3DFrame TextCenter BarSize
[1]
id = Box1
Label = *control button "Box1" autotristate clientedge
LCmd1 = [EMAIL PROTECTED]("Box1")
[2]
LCmd1 = *Format
LParam1 = NewBarRow
[3]
id = Box2
Label = *control button "Box2" autotristate clientedge
LCmd1 = [EMAIL PROTECTED]("Box2")
[4]
LCmd1 = *Format
LParam1 = NewBarRow
[5]
id = Box3
Label = *control button "Box3" autotristate clientedge
LCmd1 = [EMAIL PROTECTED]("Box3")
[6]
LCmd1 = *Format
LParam1 = NewBarRow
[7]
id = Box4
Label = *control button "Box4" autotristate clientedge
LCmd1 = [EMAIL PROTECTED]("Box4")
[8]
LCmd1 = *Format
LParam1 = NewBarRow
[9]
id = Box5
Label = *control button "Box5" autotristate clientedge
LCmd1 = [EMAIL PROTECTED]("Box5")
[10]
LCmd1 = *Format
LParam1 = NewBarRow
[11]
id = Box6
Label = *control button "Box6" autotristate clientedge
LCmd1 = [EMAIL PROTECTED]("Box6")
[12]
LCmd1 = *Format
LParam1 = NewBarRow
[13]
Label = Export and Close
LCmd1 = cl.Export("testcheckboxes",
LParam1 = pprofolder++"testcheckboxes.ini")
LCmd2 = wait.for(50)
LCmd3 = Bar.Close("testcheckboxes")