Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-02

IDE Component-dialog: small button

8 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author
to Alexey
Alexey wrote
In this dialog, button Use is too narrow. Can i make diff, to make it wide, e.g. 80pix?

ummm, it looks plenty big enough... all of the letters show with no clipping on either side... what am i missing??

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

C Western
to Unknown author
wkitty42--- wrote 8 lines
On 02/05/2017 07:41 PM, Alexey via Lazarus wrote: > In this dialog, button Use is too narrow. Can i make diff, to make it > wide, e.g. > 80pix? ummm, it looks plenty big enough... all of the letters show with no clipping on either side... what am i missing??

It looks like a button that has been autosized; I must admit my feeling is that autosized buttons should have a minimum width, something like the width of a "Cancel" button, say. The general GUI convention seems to be to have all buttons of similar sizes, and the lazarus autosize algorithm produces buttons that can often look on the small side compared to most programs. Turning off autosizing is a bad idea because of the variety of system fonts.

Colin

Reply by email

C Western
to Ondrej Pokorny
Ondrej Pokorny wrote 7 lines
On 06.02.2017 9:49, C Western via Lazarus wrote: > It looks like a button that has been autosized; I must admit my > feeling is that autosized buttons should have a minimum width You can use the Constraints property to set the minimum width in your own programs.

Indeed, though this minimum width should also depend on the font size, so requires some programming on each form (though maybe a single fixed value would work in most cases).

Colin

Reply by email

Ondrej Pokorny
to C Western
C Western wrote
Indeed, though this minimum width should also depend on the font size, so requires some programming on each form (though maybe a single fixed value would work in most cases).

Constraints are scaled according to current DPI settings in Lazarus 1.7+ (with high DPI enabled).

If you change the Font.Size property it's your own responsibility to assign a valid value to Constraints.

Ondrej

Reply by email