Specifying the Font of the List Box

Description

The owner-draw string allows you to define the font of text that it outputs.

For example, in the previous example, by changing the owner-draw string to this:

O={F=times new roman,14}{I=@$(.)+1} {@1,$(.)-1}

we are able to display the list box in Times New Roman, 14 point. The complete script is:

dim filelist[100] as C
data = <<%dlg%
customer.dbf
invoice_header.dbf
invoice_items.dbf
products.dbf
invoices.set
%dlg%
data = stritran(data,".dbf",".1")
data = stritran(data,".set",".2")
filelist.initialize(data)
filelist.sort()
result = ui_dlg_box("Select Table/Set",<<%dlg%
{region}
[%I=$a5_table,$a5_set;O={F=times new roman,14}{I=@$(.)+1} {@1,$(.)-1}%.35,10filename^#filelist]|
{endregion};
<10OK> <10Cancel>
%dlg%)

This script produces the following dialog specifying the Font in a List Box:

images/XD_Specifying the font in a listbox.gif

Limitations

Desktop applications only

See Also