Results 1 to 7 of 7

Thread: TToolbar ButtonWidth

Threaded View

  1. #1
    Win32.Trojan.Heur.Herby
    Join Date
    Dec 2003
    Location
    Nuenen of all places
    Posts
    289

    TToolbar ButtonWidth

    Waarom wordt de ButtonWidth van een ToolBar bepaald en kun je deze niet zelf zetten?

    Ik heb een Toolbar met 10 buttons onderaan het scherm staan met alleen tekst, geen images.
    De width staat altijd op 76 in designtime, onderstaand in een OnResize maakt ze niet scherm vullend.
    Wat is dan het doel van ButtonWidth als je hem zelf niet kunt zetten, de property heeft wel een "write SetButtonWidth"?

    Code:
    Dit werkt niet
    ToolBarBottom.ButtonWidth := 100;
    Code:
    Dit werkt niet
    ToolBarBottom.ButtonWidth := ToolBarBottom.Width div 10;
    Code:
    Dit werkt ook niet
      for I := 0 to 9 do
        begin
          ToolbarBottom.Buttons[I].AutoSize := true;
          ToolbarBottom.Buttons[I].Width := ToolBarBottom.Width div 10;
        end;
    Code:
    Dit werkt ook niet
      SendMessage(ToolbarBottom.Handle, TB_SETBUTTONWIDTH, 0, MAKELPARAM(0, 100));
    Last edited by Herby; 29-Jul-20 at 17:11.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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