sSpeedButton Caption

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33202
    nnolte
    Participant

    Hello,

    I had trouble with the caption on a speed button and needed to modify the sorce code. When the button layout is glyph on top or bottom the caption width calculation must not include the width of the glyph or the spacing.

    The following code for sSpeedButton.pas works for runtime. Where do I fix the same problem for design time?

    function MaxCaptionWidth(Button : TsSpeedButton) : integer;
    begin
    with Button do begin
    if (not ShowCaption) or (Caption = '') then
    Result := 0
    else if (Layout in [blGlyphTop, blGlyphBottom]) then
    Result := Width – ArrowWidth – 2 * Margin
    else
    Result := Width – ArrowWidth – 2 * Margin – (Spacing + GlyphWidth) * integer(GlyphWidth <> 0);
    end;
    end;

    Neil Nolte
    Director of Software Development
    Hirschmann Automation, LLC

    #40291
    Support
    Keymaster

    Hello and thank you for message, I'll check it soon.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.