Re: Does a option pane support items with a tabulator?
After a second try with your other suggestion I found your solution is more
a workaround.
When I add a true #\TAB there is only a small black rectangle in the
option-pane-row and no indent.
So the question remains if it is possible to use not a system-fixed-font
with a true
TAB-Byte and get a indent with a settable value?
I use it in that way from my other development tools.
It would be nice to be able to do it in a similar way and get a true
windows-look.
Regards
Hans-Peter
-----Ursprüngliche Nachricht-----
Von: David Fox [mailto:davef@xanalys.com]
Gesendet: Dienstag, 17. Juni 2003 18:06
An: Wickern, Hans- Peter
Cc: lisp-hug@xanalys.com
Betreff: Re: Does a option pane support items with a tabulator?
Is it possible to put a string containig a tab as an item in an
option pane?
Yes, though it does not display nicely.
If so, is the tabulator value settable?
What is the tabulator value? I don't think you can have dynamic
formatting within the option-pane item if that is what you mean.
Taken from the examples:
(capi:define-interface option-pane-test ()
()
(:panes
(color-chooser
capi:option-pane
:accessor color-chooser
:title "Color:"
:items (list (concatenate 'string "red" #\Tab "Great Red") :green
:blue
:white :black)
:print-function 'string-capitalize
:selection-callback 'option-pane-set-color)
(color-square
capi:output-pane
:accessor color-square))
(:layouts
(default-layout
capi:column-layout
'(color-chooser color-square)))
(:default-initargs
:title "Option Pane Test"
:best-height 200))
Your code above signals an error because CONCATENATE expects SEQUENCE
arguments. Call STRING-APPEND instead of CONCATENATE, or pass (STRING
#\Tab).
How about this? I use FORMAT ~T for the Tab and specify a fixed-width
font:
(capi:define-interface option-pane-test ()
()
(:panes
(color-chooser
capi:option-pane
:accessor color-chooser
:title "Color:"
:items '(:red :green :blue :white :black)
:print-function #'(lambda (x) (format nil "~A~8T~A" x (format nil "Great
~A" (string-capitalize x))))
:font (gp:make-font-description :stock :system-fixed-font)
:selection-callback 'option-pane-set-color)
(color-square
capi:output-pane
:accessor color-square))
(:layouts
(default-layout
capi:column-layout
'(color-chooser color-square)))
(:default-initargs
:title "Option Pane Test"
:best-height 200))
Dave Fox
Xanalys
Compass House
Vision Park
Chivers Way
Histon
Cambridge
CB4 9AD
England
Email: davef@xanalys.com
Tel: +44 1223 253793
Fax: +44 1223 257812
These opinions are not necessarily those of Xanalys.