Explorer Style Dialog Box


A description and example on how to use the explorer style dialog box.



Note the special syntax for the tab. {T=1.5:0-20} indicates a moveable tab stop whose initial position is at 1.5 inches. The tab stop can be moved in the range 0 to 20 inches. A tab definition of {T=1.5:.5-20}, for example, would indicate that when the column is resized, it cannot be moved left of the .5 inch tab position. Note the special syntax for the tab: {T=$1} means that the actual tab position will be obtained from the first tab in the referenced format string. In the case of the list box control the directive F=fmt tells the list box that the reference format string is called fmt.

dim fmt as C
fmt = "{A=1C}First{T=1.5:0-20}{A=2C}Second{T=3.5:0-20}{A=3C}Third"
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
tree_data = <<%a%
+3Users and Groups.1+2Users
+3Users and Groups.1+2Groups
tree_images = <<%a%
dim item as N
item = 1
dim dlg_title as C
dlg_title = "Resizeable List Box Columns"
This script demonstrates how to create an 'Explorer' style dialog box.;
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


Desktop applications only.

See Also