Renamed tests dir to examples
[tcl-tlc.git] / examples / test_hidden_form_label.itcl
blob6c2f531e27c80fad50617da200daaadff14a0611
1 #!/usr/bin/env tclsh
3 source "boilerplate.tcl"
5 option add *Entry.borderWidth 2
7 Form .form -padding 1 -schema {
8 _layout {label_args_sticky -anchor w}
9 _layout {row_args_sticky -resize none}
10 _layout {cell_args -fill x}
11 "Request Date" {rtimestamp subform -winding h -schema {
12 " Date" {rdate label -relief sunken -borderwidth 1 -width 12}
13 "Request Time" {rtime label -relief sunken -borderwidth 1 -width 12}
14 _layout {col_args -resize none}
15 "System Ref" {ref label -relief sunken -borderwidth 1 -width 12}
17 _layout {cell_args -fill x}
18 "Client Name" {cinfo subform -winding h -schema {
19 _layout {cell_args_sticky -fill x}
20 " Cname" {cname lookup -width 30}
21 " Portfolio" {portfolio label -width 25 -relief sunken -borderwidth 1}
23 "Details" {bar subform -winding h -schema {
24 " BS" {bs radiogroup -orient h -borderwidth 0
25 -choices "Buy b Sell s" -value "b"}
26 " CCY1" {ccy1 combobox -width 4
27 -choices "USD ZAR EUR GBP JPY" -initial_choice "USD"}
28 " Amount" {amount tagentry -policy double}
29 "Against" {ccy2 combobox -width 4
30 -choices "USD ZAR EUR GBP JPY" -initial_choice "ZAR"}
32 "Limits" {limits label}
33 "Stop Loss" {stoploss subform -winding h -schema {
34 " Loss" {loss tagentry -width 10 -policy double}
35 "Profit" {profit tagentry -width 10 -policy double}
36 " Use" {use checkbutton -text "Use"}
38 _layout {cell_args -fill both}
39 " Type and Dates" {type_and_dates subform -winding h -schema {
40 _layout {cell_args -anchor w}
41 " Type" {ttype radiogroup -text "Transaction Type" -choices {
42 "Spot" spot
43 "Fixed Forward" fwd_fixed
44 "Partially Optional Forward" fwd_partial
45 "Fully Optional Forward" fwd_full
46 } -value "spot"}
47 _layout {cell_args -anchor c}
48 " Dates" {dates subform -schema {
49 _layout {label_args_sticky -anchor w}
50 "Forward Option Date" {fwd_odate date}
51 "Spot Date" {spot date}
52 "Forward Maturity Date" {fwd_mdate date}
55 _layout {cell_args -fill both -pady {2 0}}
56 _layout {label_args -anchor nw}
57 _layout {row_args -resize both}
58 "Comments" {comments textbox -height 2 -width 40}
60 _tips {
61 "Comments" "You can enter any comments here you want to be seen by the dealers"
62 "Client Name" "Select a client to deal on behalf of"
66 Tools .tools
67 .tools add "Dump" {puts [.form get_data]} right
68 .tools add "Get TType" {puts [.form get_data type_and_dates ttype]} right
69 .tools add "Close" exit right
71 table . -padx 5 -pady 5 \
72 .form 1,1 -fill both \
73 .tools 2,1 -fill x -pady {8 0}
74 table configure . r2 -resize none