|
-
Oct 28th, 2003, 10:28 AM
#1
Thread Starter
Addicted Member
Textbox lock property (Resolved)
How do I achieve this
For Each CntTxt In pnlMain.Controls
If TypeOf CntTxt Is TextBox Then
CntTxt.ReadOnly = True
CntTxt.Cursor = Cursors.Arrow
CntTxt.ForeColor = ForeColor.Blue
End If
Next
Bolded line doesn't work.
Last edited by vsusi; Oct 28th, 2003 at 12:06 PM.
-
Oct 28th, 2003, 10:36 AM
#2
Addicted Member
how about setting the enabled property to false
-
Oct 28th, 2003, 10:40 AM
#3
at the risk of sounding funny, i'm fairly sure the " ReadOnly " property is " ReadOnly " and can only be set up at design time not at runtime.
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Oct 28th, 2003, 10:53 AM
#4
Thread Starter
Addicted Member
Enabled makes everything dull.
Locked property is not available.
I am able to set textbox readonly property even in runtime by using its name. But how do it with control collection like above.
.Net sucks for me.
.NET doesn't look like a RAD tool anymore.
-
Oct 28th, 2003, 12:06 PM
#5
Thread Starter
Addicted Member
Made it to work (Somehow)
Dim txtColl As New Collection
txtColl.Add(txtField1)
txtColl.Add(txtField2)
For i = 1 To txtColl.Count
txtColl.Item(i).Readonly = True
txtColl.Item(i).Cursor = Cursors.Arrow
txtColl.Item(i).ForeColor = ForeColor.Blue
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|