File tree Expand file tree Collapse file tree 1 file changed +38
-13
lines changed Expand file tree Collapse file tree 1 file changed +38
-13
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,11 @@ feature -- Change
44
44
hb : EV_HORIZONTAL_BOX
45
45
lab : EV_LABEL
46
46
tf : EV_TEXT_FIELD
47
+ tf_passwd : EV_PASSWORD_FIELD
47
48
but : EV_BUTTON
48
49
table : HASH_TABLE [EV_TEXT_FIELD , STRING_ 32 ]
49
50
is_creation : BOOLEAN
51
+ is_password : BOOLEAN
50
52
do
51
53
create v
52
54
v .set_border_width (3 )
@@ -59,24 +61,47 @@ feature -- Change
59
61
create lab .make_with_text (d .item .name )
60
62
if attached d .item .prompt as p then
61
63
lab .set_text (p )
64
+ if p .is_case_insensitive_equal (" Password" ) then
65
+ is_password := True
66
+ else
67
+ is_password := False
68
+ end
62
69
end
63
70
create hb
64
71
hb .set_padding_width (3 )
65
- create tf
66
- if attached d .item .value as l_val then
67
- if not l_val .is_empty then
68
- is_creation := False
72
+ if is_password then
73
+ create tf_passwd
74
+ if attached d .item .value as l_val then
75
+ if not l_val .is_empty then
76
+ is_creation := False
77
+ end
78
+ tf_passwd .set_text (l_val )
79
+ else
80
+ tf_passwd .remove_text
81
+ end
82
+ hb .extend (lab )
83
+ hb .disable_item_expand (lab )
84
+ hb .extend (tf_passwd )
85
+ v .extend (hb )
86
+ v .disable_item_expand (hb )
87
+ table .force (tf_passwd , d .item .name )
88
+ else
89
+ create tf
90
+ if attached d .item .value as l_val then
91
+ if not l_val .is_empty then
92
+ is_creation := False
93
+ end
94
+ tf .set_text (l_val )
95
+ else
96
+ tf .remove_text
69
97
end
70
- tf .set_text (l_val )
71
- else
72
- tf .remove_text
98
+ hb .extend (lab )
99
+ hb .disable_item_expand (lab )
100
+ hb .extend (tf )
101
+ v .extend (hb )
102
+ v .disable_item_expand (hb )
103
+ table .force (tf , d .item .name )
73
104
end
74
- hb .extend (lab )
75
- hb .disable_item_expand (lab )
76
- hb .extend (tf )
77
- v .extend (hb )
78
- v .disable_item_expand (hb )
79
- table .force (tf , d .item .name )
80
105
end
81
106
widget .replace (v )
82
107
if is_creation then
You can’t perform that action at this time.
0 commit comments