--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
>
> I cannot exlain this as cl.remove worked fine in a test I ran -- all 
> the tray icons are removed and then redisplayed by insert or remove.
> 
> cl.refresh and cl.display only applies to bars and are not needed or 
> useful for tray icons.
>

Here's my code just to see if you can reproduce it. The Else code that
removes the item is always problematic unless I uncomment the three
comments near the end. "Tray" is a preexisting pcf resident list.

if (cl.GetIdIndex("Tray", "NotesEntry")=="") do
  local h=cl.insert("Tray", cl.length("Tray"))
  h.addleft("*Menu", "ShowFile \x26("++?"pprofolder";;+
  ++"++\x22NoteEntry.ini\x22)")
  h.addright("\x26"++?"(env("++"\x22windir\x22)"++?"++";;+
  ++"\x22\\\\winhlp32.exe\x22)", "-I note_help \x26";;+
  ++?"(file.folder(win.exepath("++"\x22c=powerpromain\x22))";;+
  ++?"++"++"\x22\\\\powerpro.hlp\x22)")
  h.setlabel("NotesEntry")
  h.setid("NotesEntry")
  h.settooltip("Notes/Notes Help")
  h.seticon("\x26(pprofolder)Sticky Notes.icl")
  cl.savepcf()
else
;  cl.create("Empty", 1)
;  cl.setastray("Empty")
  local x=cl.GetIdIndex("Tray", "NotesEntry")
  cl.remove("Tray", x)
;  cl.setastray("Tray")
  cl.savepcf()
endif
quit

Regards,
Sheri

Reply via email to