Hi,
I have what should be an easy question that I don't know the answer to.
I would like my input prompts to display in a list fashion.
For example:
input>variable, 1. Dogs 2. Cats 3. Horses 4. Cows
will bring an input box of:
1. Dogs 2. Cats 3. Horses 4. Cows
I want the input prompt box to show as a list, like so:
1. Dogs
2. Cats
3. Horses
4. Cows.
If I add enough spacing between the descriptions items it will show in list form, but the spacing parameters are inconsistent and time consuming. I know there has to be a easy way to do this. Please let me know if you have the answer. Your assistance is greatly appreciated.
Thanks,
Nate
How to display input prompts in a list setting
Moderators: JRL, Dorian (MJT support)
Re: How to display input prompts in a list setting
Hi, you can eg use %CRLF% to get/create a new line, see example (I also added a (very) simple dialog example).
Code: Select all
//Normal input
Let>mess=1. Dogs%CRLF%2. Cats%CRLF%3. Horses%CRLF%4. Cows
Let>INPUT_BROWSE=0
Input>strRes,mess,
//With dialogs you can create your own things...
Dialog>Dialog1
object Dialog1: TForm
Left = 247
Top = 97
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 102
ClientWidth = 189
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object MSListBox1: tMSListBox
Left = 4
Top = 2
Width = 181
Height = 95
ItemHeight = 13
TabOrder = 0
SelectedIndex = -1
end
end
EndDialog>Dialog1
SetDialogProperty>Dialog1,mslistbox1,Text,mess
//Set up dialog
CODEBLOCK
GetScreenRes>xRes,yRes
SetDialogProperty>Dialog1,,Top,{%yRes%/2}
SetDialogProperty>Dialog1,,Left,{%xRes%/2}
SetDialogProperty>Dialog1,,Caption,Select Input
ENDCODEBLOCK
AddDialogHandler>Dialog1,mslistbox1,onClick,GetRes
Show>Dialog1,
SRT>GetRes
GetDialogProperty>Dialog1,mslistbox1,SelectedItems,res
CloseDialog>Dialog1
MDL>You selected: %res%
END>GetRes
Re: How to display input prompts in a list setting
Perfect! Thank you HAGCHR 
