Disabling toolbar buttons
"Krupka Michal (as michal dot krupka at upol dot cz)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
According to the CAPI doc, enabling/disabling of toolbar buttons can be done through capi:simple-pane-enabled. This works for me in Mac OS but in Windows it does nothing. Here is an example:
(capi:define-interface minimal-interface ()
()
(:panes (btn capi:push-button
:text "enable/disable"
:callback (let ((enabled nil))
(lambda (intf)
(setf (capi:simple-pane-enabled
(first (capi:interface-toolbar-items intf)))
(setf enabled (not enabled)))))
:callback-type :interface))
(:default-initargs
:toolbar-items
(list
(make-instance 'capi:toolbar-button
:image :std-copy))))
(capi:display (make-instance 'minimal-interface :width 50 :height 50))
Clicking the push button should enable/disable the toolbar button, but in Windows it doesn't work. Any ideas?
(In Mac OS the toolbar button isn't visible, but it doesn't matter as the question is about Windows)
Michal
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html