"Lloyd Moore" <·····@oakwood3.demon.co.uk> wrote in message
·································@posting.google.com...
> How do I set the font of certain elements within a list box to bold
> and/or underline? I am using Allegro CL.
Assuming you got a form with a defaultbutton with its on-change event set to
myfontchanger, and a listbox with the name single-item-list-1, this is the
quick and dirty version:
(defun myfontchanger (widget new-value old-value)
(declare (ignore-if-unused widget new-value old-value))
(setq mylistbox (find-component :single-item-list-1 (parent widget)))
(setf (font mylistbox)
(vary-font (font mylistbox) :style '(:bold :underline)))
)
A click on your defaultbutton then replaces the old font by a bold underline
font, if there is one.
"Udon" <·······@sospam.com> wrote in message news:<························@newsread4.arcor-online.net>...
> "Lloyd Moore" <·····@oakwood3.demon.co.uk> wrote in message
> ·································@posting.google.com...
> > How do I set the font of certain elements within a list box to bold
> > and/or underline? I am using Allegro CL.
>
> Assuming you got a form with a defaultbutton with its on-change event set to
> myfontchanger, and a listbox with the name single-item-list-1, this is the
> quick and dirty version:
>
> (defun myfontchanger (widget new-value old-value)
> (declare (ignore-if-unused widget new-value old-value))
>
> (setq mylistbox (find-component :single-item-list-1 (parent widget)))
> (setf (font mylistbox)
> (vary-font (font mylistbox) :style '(:bold :underline)))
> )
>
> A click on your defaultbutton then replaces the old font by a bold underline
> font, if there is one.
What I have is the following:
(defun initialise()
(setf *customer-table* (make-table-example
:pk-fields '(:cust_order_no)
:compound-fields '(:prod_no)
:non-pk-fields '(:cust_no
:cust_name
:cust_addr
:cust_tel
:prod_no
:prod_name
:prod_qty
:prod_price)))
)
An event handler populates a listbox with the range set to the above
values, all I want to achieve is to set the '(:cust_order_no) to be
shown in bold or underlined with the rest of the fields in normal
font. I don't want all the fields to be bold.
Thanks,