Results 1 to 9 of 9

Thread: TextBox Array, Change size

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Stockholm, Sweden
    Posts
    83
    I have an array of TextBox. How do I at design time change the size of all of them. They all have the same size but I want them to be bigger.
    Yesterday, all my troubles seemed so far away...
    Help, I need somebody, Help...
    Now MCSD and still locking for intresting job in the south parts of Stockholm, Sweden.

  2. #2
    Guest
    Try:

    Code:
      For Each MyControl In Me.Controls
          If TypeOf MyControl Is Textbox Then MyControl.FontSize = "18"
      Next

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    'change the size of a textbox control array at design time
    Private Sub Command1_Click()
    
        Dim intCre As Integer
        
        For intCre = 0 To Text1.Count - 1
            Text1(intCre).Width = 450
            Text1(intCre).Height = 450
        Next
        
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Stockholm, Sweden
    Posts
    83
    It looks more like at run time to me. Is it not possible to do it with the mouse draging and so as I would have done if it was only one textbox.
    Yesterday, all my troubles seemed so far away...
    Help, I need somebody, Help...
    Now MCSD and still locking for intresting job in the south parts of Stockholm, Sweden.

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Oooops...sorry.it's early...

    Not by dragging but if you select all textboxes.ie hold down the Ctrl button and select eact text box you can then fress f4 for properties andt change the properity

    Ex. Width and it will affect all the text boxes.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Stockholm, Sweden
    Posts
    83

    Smile Thanks !

    Thanks, now it works. I learned from the code also so thanks again.
    Yesterday, all my troubles seemed so far away...
    Help, I need somebody, Help...
    Now MCSD and still locking for intresting job in the south parts of Stockholm, Sweden.

  7. #7
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Actually you can do this with the keyboard. Select all the controls you want to change the size for then hold down the shift key and press one of the arrow keys. If you hold down the CTRL key instead of shift you will move the controls on the form.

    Good luck!

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Stockholm, Sweden
    Posts
    83

    Smile Thanks !

    That was the thing I was looking for, I remebered it then I saw it. Thanks ! /AKA
    Yesterday, all my troubles seemed so far away...
    Help, I need somebody, Help...
    Now MCSD and still locking for intresting job in the south parts of Stockholm, Sweden.

  9. #9
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    interesting! hadn't seen that before...
    Thanks as well!
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width