Results 1 to 9 of 9

Thread: how do you ...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2002
    Location
    RI
    Posts
    96

    how do you ...

    How do you make a new control during runtime ?
    like a label ?
    I program in: vb6,vb.net,html,c++,java/script

  2. #2
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456

    Re: how do you ...

    Originally posted by Luke1
    How do you make a new control during runtime ?
    like a label ?
    You can do that. easiest way is to have a label at design time and create label as a control array (same name, different index). You can use load function to load labels at run time. Not to mention you are going to have to control there attributes like Appearance, Left, Top, Width etc .. at run time.

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    First let me make a couple of suggestions.

    Use a more descriptive suject for your post. "How do you create controls at runtime?" would have been one possibility.

    Search the forum. I did a search for control AND runtime and came up with a lot of hits including
    this one from IROY55.

    Those suggestions and others you might find helpful are in the post you'll be directed to if you click the "How to get your questions answered" in my signature.

  4. #4

  5. #5
    Lively Member
    Join Date
    Dec 2002
    Location
    Under the Boardwalk
    Posts
    79
    I have a question...
    is there anyway you can change the style during runtime since the control style is a read-only while the app is running? I guess what i am asking is there a way to change the style from read only?
    -=]{ i ( ( er =-

  6. #6
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    The style of what?

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  7. #7
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    When you say "style" we don't know for sure what kind of control you are talking about. Do you mean the Style property of a ComboBox? Anyhow, most properties of controls can be changed while the program is running, but there are some that can't like the Style property of the ComboBox or the Sorted property of the ListView control.

  8. #8
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Originally posted by MartinLiss
    When you say "style" we don't know for sure what kind of control you are talking about. Do you mean the Style property of a ComboBox? Anyhow, most properties of controls can be changed while the program is running, but there are some that can't like the Style property of the ComboBox or the Sorted property of the ListView control.
    The Sorted property of a ListView can be changed at runtime.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  9. #9

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