| |

VerySource

 Forgot password?
 Register
Search
View: 992|Reply: 9

How can I make the speedbutton display three solid dots centered horizontally

[Copy link]

1

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-3 14:20:02
| Show all posts |Read mode
May I ask experts:
    By changing which property, you can make the caption of the speedbutton to three points,
Reply

Use magic Report

0

Threads

53

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-1-3 22:03:01
| Show all posts
The caption of the speedbutton is originally centered. It may be that the font or button height is not adjusted.

Created a TButtonGlyph class in the create of speedbutton
This class can be used to adjust the appearance behavior
There is a private member method under this class
procedure TButtonGlyph.DrawButtonText (Canvas: TCanvas; const Caption: string;
  TextBounds: TRect; State: TButtonState; BiDiFlags: LongInt);
begin
  with Canvas do
  begin
    Brush.Style: = bsClear;
    if State = bsDisabled then
    begin
      OffsetRect (TextBounds, 1, 1);
      Font.Color: = clBtnHighlight;
      DrawText (Handle, PChar (Caption), Length (Caption), TextBounds,
        DT_CENTER or DT_VCENTER or BiDiFlags);
      OffsetRect (TextBounds, -1, -1);
      Font.Color: = clBtnShadow;
      DrawText (Handle, PChar (Caption), Length (Caption), TextBounds,
        DT_CENTER or DT_VCENTER or BiDiFlags);
    end else
      DrawText (Handle, PChar (Caption), Length (Caption), TextBounds,
        DT_CENTER or DT_VCENTER or BiDiFlags);
  end;
end;
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-4 18:12:01
| Show all posts
SpeedButton.caption: = '...';

Isn't this enough? It confuses you.
Reply

Use magic Report

1

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-5 09:45:01
| Show all posts
Maybe I didn't make it clear, what I want is a three-point selection button to the right of the lines property in the memo component. I have done it before, but now I forgot it, but it must be changed by changing a certain property value of the speedbutton.
Reply

Use magic Report

0

Threads

53

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-1-5 09:54:01
| Show all posts
Dizzy, the landlord can describe it accurately. Do you work as a company now, do you need a company thing, do you want to create components?
Reply

Use magic Report

1

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-5 10:18:01
| Show all posts
It's actually very simple, I need a three-point selection button to the right of the lines property in the memo component, as long as its shape
Reply

Use magic Report

0

Threads

53

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 Unknown

Post time: 2020-1-5 12:36:01
| Show all posts
Do it yourself, it is embedded in other components
Is it?
Reply

Use magic Report

1

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-5 13:42:01
| Show all posts
speedbutton can be set to this shape, but how to set it I forgot
Reply

Use magic Report

0

Threads

12

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-1-21 20:00:02
| Show all posts
SpeedButton supports pictures. It is not difficult to draw a picture with three dots
Reply

Use magic Report

1

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-23 18:36:01
| Show all posts
I know what I said upstairs, but what I seek is a way to change the speedbutton property to achieve the demand
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list