aboutsummaryrefslogtreecommitdiff
path: root/support_text.icl
blob: 21cfc053e0cd23a129366d4ad154249cf2fad4de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module support_text

// ********************************************************************************
// Clean tutorial example program.
//
// This program can be used to test the different ControlAttributes for a 
// TextControl in a Dialog.
// ********************************************************************************

import StdEnv, StdIO

Start :: *World -> *World
Start world
# (id, world) = openId world 
# texts = [
        TextControl "Hide"  [ControlHide],
        TextControl "Id"    [ControlId id],
        TextControl "Pos"   [ControlPos (Left, zero)],
        TextControl "Tip"   [ControlTip "Some tip"],
        TextControl "Width" [ControlWidth (PixelWidth 500)]
    ]
# controls = ListLS texts
# dialog = Dialog "Support - TextControl" controls [WindowClose (noLS closeProcess)]
= startIO NDI Void (initialise dialog) [] world
where
    initialise dialog pst
    # (error,pst)       = openDialog 0 dialog pst
    | error <> NoError  = closeProcess pst
    | otherwise         = pst