Re: [Lazarus] Ann: TButtonEdit as replacement for TEditButton

2014-04-07 Thread Michael Van Canneyt



On Sun, 6 Apr 2014, Bart wrote:


On 4/6/14, Michael Van Canneyt mich...@freepascal.org wrote:


The old design was a poor one


Well, it used what was available at the time in the LCL,
which was not much compared to what can be done today :)


Well, maybe that was frased a little crude, but no offense was
intended by all means.


No offense taken. 
On the contrary, I'm very glad to see that things improve, this is the main point !


Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] lfm file format

2014-04-07 Thread Michael Schnell

On 04/06/2014 09:50 PM, Marc Santhoff wrote:


 floating


Bells ringing Firemonkey :-) ?

-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Custom GraphicsControl - need Canvas to set Height outside OnPaint

2014-04-07 Thread Petr Kristan
Hi.

I'am creating an graphics control and I need Canvas to set control
Height. But I can draw (access to Canvas) only in OnPaint event.

How to solve this problem?

Thanks
Petr

-- 
Petr Kristan
.
EPOS PRO s.r.o., Smilova 333, 530 02 Pardubice
tel: +420 461101401Czech Republic (Eastern Europe)
fax: +420 461101481

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Custom GraphicsControl - need Canvas to set Height outside OnPaint

2014-04-07 Thread zeljko

On 04/07/2014 11:01 AM, Petr Kristan wrote:

Hi.

I'am creating an graphics control and I need Canvas to set control
Height. But I can draw (access to Canvas) only in OnPaint event.

How to solve this problem?


You need to set height of control by calculating text height out of 
paint event ?  I'm using TBitmap for such measurements.

Create bitmap, assign control font to bmp canvas, measure.

z.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Custom GraphicsControl - need Canvas to set Heightoutside OnPaint

2014-04-07 Thread Vojtěch Čihák

Hi,
 
you can do measurement in overriden CreateWnd, Canvas already exists there.
 
Blaazen 
__

Od: Petr Kristan petr.kris...@epos.cz
Komu: lazarus@lists.lazarus.freepascal.org
Datum: 07.04.2014 11:03
Předmět: [Lazarus] Custom GraphicsControl - need Canvas to set Heightoutside 
OnPaint


Hi.

I'am creating an graphics control and I need Canvas to set control
Height. But I can draw (access to Canvas) only in OnPaint event.

How to solve this problem?

Thanks
Petr

--
Petr Kristan
.
EPOS PRO s.r.o., Smilova 333, 530 02 Pardubice
tel: +420 461101401    Czech Republic (Eastern Europe)
fax: +420 461101481

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] OT: Re: lfm file format

2014-04-07 Thread Reinier Olislagers
On 06/04/2014 21:34, Graeme Geldenhuys wrote:
snip
 I don't use TDataset, so might get the terminology wrong, so bare with
 me.

I know summer is theoretically coming to the UK  The Netherlands, but
this may be going too far ;)

Apart from that, having some kind of wizard that provides this
functionality would be nice, yes.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Custom GraphicsControl - need Canvas to set Height outside OnPaint

2014-04-07 Thread Petr Kristan
On Mon, Apr 07, 2014 at 11:11:28AM +0200, zeljko wrote:
 On 04/07/2014 11:01 AM, Petr Kristan wrote:
 Hi.
 
 I'am creating an graphics control and I need Canvas to set control
 Height. But I can draw (access to Canvas) only in OnPaint event.
 
 How to solve this problem?
 
 You need to set height of control by calculating text height out of
 paint event ?  I'm using TBitmap for such measurements.
 Create bitmap, assign control font to bmp canvas, measure.

Tanks for fast helpfull responses.

Petr

-- 
Petr Kristan
.
EPOS PRO s.r.o., Smilova 333, 530 02 Pardubice
tel: +420 461101401Czech Republic (Eastern Europe)
fax: +420 461101481

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Large toolbar buttons

2014-04-07 Thread Richard Mace
On 6 April 2014 21:03, Vojtěch Čihák vojtech.ci...@atlas.cz wrote:

 Hi,



 there are two ShowCaption properties. One TToolButton.ShowCaption and the
 second TToolBar.ShowCaption.

 Also, there is TToolBar.ButtonHeight when you need large buttons.


​Ah, that was it :)

Thanks​
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Large toolbar buttons

2014-04-07 Thread Vojtěch Čihák

Hi, 
 
thinking about it, if now someone wants display Caption, he must:
-set ToolBar.ShowCaptions to True
-set ToolButton.ShowCaption to True
-set some Caption
 
Isn't it to much? Isn't assigning any Caption enough? I thought it is because 
of Delphi compatibility but looking to their docs: 
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/!!MEMBERTYPE_Properties_ComCtrls_TToolButton.html
seems that Delphi has no ToolBar.ShowCaption, so it is Lazarus invention.
Is there any reason for this property? If no, I suggest to mark it as 
deprecated.
 
Thanks
 
Blaazen 
__

Od: Richard Mace richard.m...@gmail.com
Komu: Lazarus mailing list lazarus@lists.lazarus.freepascal.org
Datum: 07.04.2014 17:49
Předmět: Re: [Lazarus] Large toolbar buttons


On 6 April 2014 21:03, Vojtěch Čihák vojtech.ci...@atlas.cz 
vojtech.ci...@atlas.cz wrote:
Hi,
 
there are two ShowCaption properties. One TToolButton.ShowCaption and the 
second TToolBar.ShowCaption.
Also, there is TToolBar.ButtonHeight when you need large buttons.

Ah, that was it :)

Thanks

--

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Large toolbar buttons

2014-04-07 Thread Mattias Gaertner
On Mon, 07 Apr 2014 19:43:24 +0200
Vojtěch Čihák vojtech.ci...@atlas.cz wrote:

 Hi, 
  
 thinking about it, if now someone wants display Caption, he must:
 -set ToolBar.ShowCaptions to True
 -set ToolButton.ShowCaption to True

ToolButton.ShowCaption is True by default, so you don't need to set it.

 -set some Caption
  
 Isn't it to much?

You only need to set ShowCaptions and Captions.

 Isn't assigning any Caption enough? I thought it is because of Delphi
 compatibility but looking to their docs:
 
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/!!MEMBERTYPE_Properties_ComCtrls_TToolButton.html
 seems that Delphi has no ToolBar.ShowCaption, so it is Lazarus invention.
 Is there any reason for this property? If no, I suggest to mark it as 
 deprecated.

The idea is that some button captions can be hidden.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OT: Re: lfm file format

2014-04-07 Thread Graeme Geldenhuys
On 2014-04-07 11:16, Reinier Olislagers wrote:
 I know summer is theoretically coming to the UK  The Netherlands, but
 this may be going too far ;)


Oops, minor typo - with a totally different outcome! :-D


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OT: Re: lfm file format

2014-04-07 Thread Graeme Geldenhuys
On 2014-04-07 11:16, Reinier Olislagers wrote:
 Apart from that, having some kind of wizard that provides this
 functionality would be nice, yes.


I just tested with Lazarus. That functionality I describe with Delphi,
doesn't work in Lazarus IDE.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus