[Lazarus] Default - minor Delphi incompatability

2017-05-30 Thread Bob B. via Lazarus
If you set a control's Default property to True, it still isn't unless you also set the TabStop property to true. I use Laz version 1.2.6 for Windowds. Bob B.-- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] TFont.Assign not complete

2017-05-30 Thread Vojtěch Čihák via Lazarus
Hi,   IMO it should be OK. PixelsPerInchs has probably meaning when you have two displays with different DPI. Therefore copying the value PixelsPerInchs is wrong because method Assign() cannot know where the font will be displayed (on the same display or the second display with different DPI).

[Lazarus] TFont.Assign not complete

2017-05-30 Thread Alexey via Lazarus
Not sure it is ok, why not to a) copy Size, b) copy PixelsPerInch. why such strange logic. if TFont(Source).PixelsPerInch <> FPixelsPerInch then // use size to convert source height pixels to current resolution Size := TFont(Source).Size else

Re: [Lazarus] Measuring text width in a TEdit

2017-05-30 Thread Martin Frb via Lazarus
On 30/05/2017 07:36, Torsten Bonde Christiansen via Lazarus wrote: Hi List. I want to know the placement of the caret (in pixels, not character count) in a TEdit. However i am struggeling to fint a method that will allow me to do so. If i try to calculate it using the assigned font, I have

Re: [Lazarus] Measuring text width in a TEdit

2017-05-30 Thread Vojtěch Čihák via Lazarus
Hi,   maybe you can create some temporary canvas, assign TEdit.Font to TCanvas.Font, do the measurement and free that canvas.   V. __ Od: Torsten Bonde Christiansen via Lazarus Komu: Lazarus mailing list

[Lazarus] Measuring text width in a TEdit

2017-05-30 Thread Torsten Bonde Christiansen via Lazarus
Hi List. I want to know the placement of the caret (in pixels, not character count) in a TEdit. However i am struggeling to fint a method that will allow me to do so. If i try to calculate it using the assigned font, I have the problem that TEdit.Font.GetTextWidth always returns the default