Lisp HUG Maillist Archive

[CAPI] Tooltips on button panels

  Hello,

can someone explain to me how to put tooltips on choices in button
panels (checkboxes, radio buttons etc.). The panels are created
declaratively, as in:

(define-interface foo ()
    (...)
  (:panes
   ...
   (panel check-button-panel
     :layout-class 'column-layout
     :title "Options" :title-position :frame
     :items '((:this t) (:that t))
     :print-function (lambda (item) (keyword-capitalize (car item)))
     ...)))

Thanks!

-- 
Resistance is futile. You will be jazzimilated.

Jazz site:   http://www.didierverna.com
Other sites: http://www.didierverna.info

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Re: [CAPI] Tooltips on button panels

I'm not aware of a CAPI option for this. I used the method below on the Mac.

John DeSoi, Ph.D.



(defun %set-tooltip (ui-menu-item tip)
  (let ((ref (capi-internals:representation ui-menu-item)))
    (when ref
      (objc:invoke ref "setToolTip:" (if (stringp tip) tip ""))))

> On Mar 16, 2020, at 11:30 AM, Didier Verna <didier@lrde.epita.fr> wrote:
> 
> can someone explain to me how to put tooltips on choices in button
> panels (checkboxes, radio buttons etc.). The panels are created
> declaratively, as in:

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Re: [CAPI] Tooltips on button panels

"John DeSoi (as desoi at pgedit dot com)" <lisp-hug@lispworks.com> wrote:

> I'm not aware of a CAPI option for this. I used the method below on the Mac.

  Thank you. In the meantime, I found a simple solution, which is to set
  up a global help callback on the whole interface. There is in fact a
  complete example in capi/elements/help.lisp.

-- 
Resistance is futile. You will be jazzimilated.

Jazz site:   http://www.didierverna.com
Other sites: http://www.didierverna.info

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Updated at: 2020-12-10 08:29 UTC