Posted to tcl by kevin_walzer at Tue Oct 06 20:30:28 GMT 2020view raw

  1. image create photo book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw==
  2.  
  3. systray create book "Systray sample" {puts "Here is the systray output"}
  4.  
  5. proc modify { } {
  6.  
  7. image create photo page -data R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7
  8.  
  9. systray modify image page
  10. systray modify text "Modified text"
  11. systray modfiy callback {puts "this is a different output"}
  12.  
  13. }
  14.  
  15.  
  16. proc notification {args} {
  17.  
  18. sysnotify "Alert" "This is an alert"
  19.  
  20. }
  21.  
  22. pack [button .b1 -text "Modify" -image book -command modify]
  23. pack [button .b2 -text "Notify" -command notification
  24. pack [button .b3 -text "Destroy" -command {systray destroy}]
  25.  
  26.  
  27.  
  28.  
  29.