List Box R Directive

Syntax

%R%

Description

The R directive specifies that a list box will have a specific number of lines, regardless of the point size of the text in the list box. Note the [%O={@@};F=fmt;R;B=T%.100,18item^#data] line in the example below.

Example

dim orig_fmt as C
dim fmt as C
fmt = "{A=1C}First{T=1.5:0-20}{A=2C}Second{T=3.5:0-20}{A=3C}Third{A=}"
data = <<%a%
Row 1 Column 1{T=$1}Row 1 Column 2{T=$2}Row 1 Column 3
Row 2 Column 1{T=$1}Row 2 Column 2{T=$2}Row 2 Column 3
Row 3 Column 1{T=$1}Row 3 Column 2{T=$2}Row 3 Column 3
Row 4 Column 1{T=$1}Row 4 Column 2{T=$2}Row 4 Column 3
Row 5 Column 1{T=$1}Row 5 Column 2{T=$2}Row 5 Column 3
Row 6 Column 1{T=$1}Row 6 Column 2{T=$2}Row 6 Column 3
%a%
tree_data = <<%a%
+3Users and Groups.1+2Users
+3Users and Groups.1+2Groups
%a%
tree_images = <<%a%
$a5_folder
$a5_folder_open
user_object16x16_0
%a%
dim item as N
dim dlg_title as C
item = 1
dlg_title = "Resizeable List Box Columns"
ui_dlg_box(dlg_title,<<%dlg%
{font=tahoma,8}
{wrap=100}
This script demonstrates how to create an 'Explorer' style dialog box.;
{lf};
{font=}
{stretch=height,width}
[%S=LX;I=@tree_images%.30,20^ 
{hslider}
{beginembedded}
{stickto=left}
{stretch=width,height}
{watch=ui_dlg_control_anchor_from_pos(dlg_title)!resize}
<%O={@@};B=ILG;F=fmt%100=fmt!click>;
[%O={@@};F=fmt;R;B=T%.100,18item^#data]
{endembedded}
;
{stretch=top}
<10&Close!close>;
%dlg%,<<%code%
if a_dlg_button = "resize" then
    'This event is fired whenever the mouse is over the column headings.
    'The event fires whether or not the columns are actually resized.
    a_dlg_button = ""
end if
if a_dlg_button = "click" then
    a_dlg_button = ""
    control = ui_dlg_control_anchor_from_pos(dlg_title)
    ui_msg_box("","User pressed: " + control)
end if
%code%)   

See Also