SunQuest
 
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old November 3rd, 2004, 05:04 AM
tr333 tr333 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 44 tr333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 58 sec
Reputation Power: 4
need help changing control properties in vb.net

if i have a form with multiple textboxes on it, can someone please show me how to change a specific property on all of the textboxes at the same time.

Reply With Quote
  #2  
Old November 4th, 2004, 12:49 AM
SoberButCrazy SoberButCrazy is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 15 SoberButCrazy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
During design time you can press the control button and select all the text boxes before changing the property

During execution mode you could link the text boxs property to one text box. When it changes they all will change.

Reply With Quote
  #3  
Old November 4th, 2004, 04:48 AM
tr333 tr333 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 44 tr333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 58 sec
Reputation Power: 4
how do you link all textboxes to one textbox?

i found that i can add each textbox to the controls collection with controls.add(controlname) and then go through that list.

Reply With Quote
  #4  
Old November 4th, 2004, 05:31 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,608 Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 4 Days 12 h 53 m 47 sec
Reputation Power: 1400
indeed, something like this would be fine: (pseudo-code)
For Each control In Controls
If control.Type="textbox" Then control.property="something"
Next
but of course linking them all is better - I don't know how to do that either.

Reply With Quote
  #5  
Old November 4th, 2004, 05:35 AM
tr333 tr333 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 44 tr333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 58 sec
Reputation Power: 4
thanks for the great tips

Reply With Quote
  #6  
Old November 4th, 2004, 05:59 AM
tr333 tr333 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 44 tr333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 58 sec
Reputation Power: 4
that looping structure would work, but im not sure how to compare the current control in the loop with a controlname.

i have tried the following code, but it didnt seem to work.

Code:
If x.GetType Is Type.GetType("button", False, True) Then
'do something
End If


does anybody know the correct syntax for doing this?

Reply With Quote
  #7  
Old November 4th, 2004, 06:32 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,608 Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1Folding Points: 325618 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 4 Days 12 h 53 m 47 sec
Reputation Power: 1400
the syntax in vbscript is:
If LCase(TypeName(x))="button" Then
...

Reply With Quote
  #8  
Old November 4th, 2004, 06:37 PM
tr333 tr333 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 44 tr333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 58 sec
Reputation Power: 4
it works perfectly....

thanks for the great help.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > need help changing control properties in vb.net


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway