E
EricW
Hi,
In my program I create dynamicly a list of textboxes and based on how the
connected fields are defined they are masked or not.
here is the code:
txt = New TextBox
txt.Name = "lblValue" + ab.ToString("00")
txt.Margin = New Padding(5, 0, 0, 0)
txt.Font = fn
txt.BorderStyle = BorderStyle.None
txt.BackColor = Color.FloralWhite
txt.AutoSize = False
txt.Size = New Size(220, 20)
txt.MinimumSize = New Size(200, 16)
txt.MaximumSize = New Size(200, 180)
txt.WordWrap = True
txt.Multiline = True
txt.ReadOnly = True
txt.PasswordChar = GetMasked(dsDefs, rw, ab)
txt.Text = rw(ab)
pnItem.Controls.Add(txt)
pnItem.Controls(txt.Name).Location = New Point(150, ay)
ad = New Size
ad = pnItem.Controls(txt.Name).PreferredSize
pnItem.Controls(txt.Name).Size = ad
The function GetMasked checks if the text should be masked or not. It
returns chrW(42) if it needs to be masked, nothing if not.
Unfortunatly this is not working. The text is not masked.
Even when I comment out the GetMasked function and replace it with chrW(42)
then it still doesn't mask my text.
What am I doing wrong here?
Must the passwordchar property be set before another property?
pls help.
rg,
Eric
In my program I create dynamicly a list of textboxes and based on how the
connected fields are defined they are masked or not.
here is the code:
txt = New TextBox
txt.Name = "lblValue" + ab.ToString("00")
txt.Margin = New Padding(5, 0, 0, 0)
txt.Font = fn
txt.BorderStyle = BorderStyle.None
txt.BackColor = Color.FloralWhite
txt.AutoSize = False
txt.Size = New Size(220, 20)
txt.MinimumSize = New Size(200, 16)
txt.MaximumSize = New Size(200, 180)
txt.WordWrap = True
txt.Multiline = True
txt.ReadOnly = True
txt.PasswordChar = GetMasked(dsDefs, rw, ab)
txt.Text = rw(ab)
pnItem.Controls.Add(txt)
pnItem.Controls(txt.Name).Location = New Point(150, ay)
ad = New Size
ad = pnItem.Controls(txt.Name).PreferredSize
pnItem.Controls(txt.Name).Size = ad
The function GetMasked checks if the text should be masked or not. It
returns chrW(42) if it needs to be masked, nothing if not.
Unfortunatly this is not working. The text is not masked.
Even when I comment out the GetMasked function and replace it with chrW(42)
then it still doesn't mask my text.
What am I doing wrong here?
Must the passwordchar property be set before another property?
pls help.
rg,
Eric