CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Location
    Leeds
    Posts
    123

    Control Resize Grab bars

    Hi,

    I am creating a set of controls. Some of which I don't want to allow vertical, or at times horizontal resizing.

    So far I have just been catching the resize event in my code and denying verticle or horizontal resizing as appropriate. There must be a better way. If you look at the Text box control when MultiLine is turned off, VB.NET will not allow you to even use the verticle Resize bars. That is what I want my controls to do at design time. Does anyone know how to do that?

    I'm quite new to VB.NET though I have done years of VB6 so don't worry about using complex example code.

    Any help would be extremely appreciated.
    Cheers,
    Angelus
    Some people say 'The world is a very strange place'

    Compared to what?

  2. #2
    Join Date
    Oct 2002
    Location
    Växjö, Sweden
    Posts
    225
    What if you declare the height property readonly?

    /Leyan

  3. #3
    Join Date
    Jul 2002
    Location
    Leeds
    Posts
    123
    Yeah, I see what you are getting at, but like the textbox I want to be able to change the control at runtime. For example I have rapped the textbox with another control (a label) and I want the height to be the same as the textbox. I don't want the user to be able to change the height unless the MultiLine property is set to true.

    I want to make a control behave like the textbox control does, basically. Other controls I want to be fixed width etc.

    Cheers,
    Angelus
    Some people say 'The world is a very strange place'

    Compared to what?

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

Featured