Results 1 to 4 of 4

Thread: Resizing toolStrip Buttons

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2007
    Posts
    55

    Resizing toolStrip Buttons

    I have a few toolstrips that have a number of different buttons each. I want the user to be able to resize the buttons to Small, Medium or Large sizes. The problem is that when I resize the toolbars they do not redraw or refresh until I do some sort of manual resizing of the form, ether expanding/shrinking or minimizing/maximizing the window.

    I've tried using both functions below:

    tStrip.ImageScalingSize = 24;

    tStrip.Scale(new SizeF(24, 24));

    Followed by combinations of the following functions:

    tStrip.Refresh();
    tStrip.Update();
    this.Refresh();
    this.Update();

    Nothing I try seems to actually work.

  2. #2
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Resizing toolStrip Buttons

    Not sure if this will work, but try
    Code:
    tStrip.Width = this.Width;

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2007
    Posts
    55

    Re: Resizing toolStrip Buttons

    That works. Thanks.

  4. #4
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Resizing toolStrip Buttons

    No worries

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