Sign in Join

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

Mailing lists / lazarus / 2008-08

TButton must now become a custom draw component

16 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

Yes I had to mention this, because it was one of the things I bitched about so often in the past!.

As per the Lazarus design guidelines (I don't really know where those are), Lazarus *must* be as compatible with VCL as possible. So after watching the "What's new in VCL" which is going to be Delphi 2009 (Tiburon), TButton can now take an image, do image padding and reposition the image. Only way for that to happen on all platforms, is to be a custom drawn button!!! So basically TBitBtn can fall away, or be renamed to TButton. The old TBitBtn can then become an alias to TButton for backwards compatibility.

And seeing that TButton must now be custom drawn, we can finally get the long last feature..... Changing the button background color (my original gripe) like CLX. :)

At this rate (although slow), all VCL components will one day be custom draw, which basically means VCL will be a fpGUI clone. ;-)

If anybody else wants to what the video, here is the direct link: http://video.codegear.com/Tiburon/WhatsNewInTheVCL_English/WhatsNewInTheVCL.flv

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Bogusław Brandys
to Graeme Geldenhuys

Graeme Geldenhuys pisze:

Show quoted text 37 lines
Hi, Yes I had to mention this, because it was one of the things I bitched about so often in the past!. As per the Lazarus design guidelines (I don't really know where those are), Lazarus *must* be as compatible with VCL as possible. So after watching the "What's new in VCL" which is going to be Delphi 2009 (Tiburon), TButton can now take an image, do image padding and reposition the image. Only way for that to happen on all platforms, is to be a custom drawn button!!! So basically TBitBtn can fall away, or be renamed to TButton. The old TBitBtn can then become an alias to TButton for backwards compatibility. And seeing that TButton must now be custom drawn, we can finally get the long last feature..... Changing the button background color (my original gripe) like CLX. :) At this rate (although slow), all VCL components will one day be custom draw, which basically means VCL will be a fpGUI clone. ;-) If anybody else wants to what the video, here is the direct link: http://video.codegear.com/Tiburon/WhatsNewInTheVCL_English/WhatsNewInTheVCL.flv Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

That would require a lot of improvement in repainting controls because such LCL I suppose would be deadly slow with all buttons custom drawn. Just my two cents little opinion...

Regards
Boguslaw

Reply by email

Boian Mitov
to Bogusław Brandys

This all depends on how efficient the custom draw code is, and what framework it uses ;-) .

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 11 lines
----- Original Message ----- From: "Boguslaw Brandys" To: "General mailing list" Sent: Wednesday, August 06, 2008 1:07 PM Subject: Re: [Lazarus] TButton must now become a custom draw component > > That would require a lot of improvement in repainting controls because > such LCL I suppose would be deadly slow with all buttons custom drawn. > Just my two cents little opinion...

Reply by email

Marc Weustink
to Graeme Geldenhuys: Yes I had to mention this, because it was one of the things I bitched about so often in…
Graeme Geldenhuys wrote 13 lines
Hi, Yes I had to mention this, because it was one of the things I bitched about so often in the past!. As per the Lazarus design guidelines (I don't really know where those are), Lazarus *must* be as compatible with VCL as possible. So after watching the "What's new in VCL" which is going to be Delphi 2009 (Tiburon), TButton can now take an image, do image padding and reposition the image. Only way for that to happen on all platforms, is to be a custom drawn button!!! So basically TBitBtn can fall away, or be renamed to TButton. The old TBitBtn can then become an alias to TButton for backwards compatibility.

So Delphi broke compatebility itself ?

Let's wait till the real version is released and stop speculating.

Marc

Reply by email

Graeme Geldenhuys
to Bogusław Brandys: Graeme Geldenhuys pisze: That would require a lot of improvement in repainting controls…
Bogus?aw Brandys wrote
That would require a lot of improvement in repainting controls because such LCL I suppose would be deadly slow with all buttons custom drawn. Just my two cents little opinion...

CodeGear thought it will work and made it work. So did other toolkits (but I ain't naming names). ;-)

With components included in Delphi 2009, like the set of Ribbon controls etc... They are all custom draw without speed issues (even though I think the ribbon control is stupid, to complex for a normal user and takes up half the screen etc...)

BTW:
TEdit is now also custom drawn, with it's fancy shaded hint text ability and hot new password char [which I thought was always there]. ListView (with groups) are also custom drawn, plus a few others.... custom drawn components rule. Native is so old school. ;-)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Marc Weustink: So Delphi broke compatebility itself ? Let's wait till the real version is released and…
Marc Weustink wrote
So Delphi broke compatibility itself ?

No, they simply made it custom drawn by probably asking the themeing api to draw the basics and then they fill in the rest. Qt does the same.

Let's wait till the real version is released and stop speculating.

It's not the videos, read the blogs from
Nick Hodges and friends etc... They will not release all this information and then retract those component! All the information is from official CodeGear staff, and it's called marketing and building excitement before a launch.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Boian Mitov
to Marc Weustink: So Delphi broke compatebility itself ? Let's wait till the real version is released and…

Delphi has always been only backward compatible ;-) . Forward compatibility was never promised, and has never been the case. They have been adding new features to the VCL all the time, but I can still open projects done with D5 as example.

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 9 lines
----- Original Message ----- From: "Marc Weustink" To: "General mailing list" Sent: Wednesday, August 06, 2008 2:33 PM Subject: Re: [Lazarus] TButton must now become a custom draw component > Graeme Geldenhuys wrote: > So Delphi broke compatebility itself ?

Reply by email

Graeme Geldenhuys
to Marc Weustink: So Delphi broke compatebility itself ? Let's wait till the real version is released and…
Marc Weustink wrote
Let's wait till the real version is released and stop speculating.

Just to reaffirm, it's a "sneak peak at what's new in VCL" hosted on CodeGear's developer network. Doesn't sound like speculation to me.

Sneak Peek Video - What's New in the VCL in Delphi and C++Builder 2009 hosted by David I.
http://dn.codegear.com/article/38383

And the direct link so you don't have to watch it in your web browser. http://video.codegear.com/Tiburon/WhatsNewInTheVCL_English/WhatsNewInTheVCL.flv

PS:
The name of the video itself says something.... It's implemented and done.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Marc Weustink
to Graeme Geldenhuys: No, they simply made it custom drawn by probably asking the themeing api to draw the…
Graeme Geldenhuys wrote 6 lines
On 8/6/08, Marc Weustink wrote: > So Delphi broke compatibility itself ? No, they simply made it custom drawn by probably asking the themeing api to draw the basics and then they fill in the rest. Qt does the same.

So ?
This means that this has to be done by the LCL or by the widgetset ?

Show quoted text 9 lines
> Let's wait till the real version is released and stop speculating. It's not the videos, read the blogs from Nick Hodges and friends etc... They will not release all this information and then retract those component! All the information is from official CodeGear staff, and it's called marketing and building excitement before a launch.

I'm not in a hurry to implement all those fancy new stuff. Better get something working like D7 first.
When time comes, we'll think how to "fix" this. (At first sight i'm against a default custom drawn button)

Marc

Reply by email

Graeme Geldenhuys
to Marc Weustink
Marc Weustink wrote
So ? This means that this has to be done by the LCL or by the widgetset ?

By LCL, because the native widgetsets don't have all those features included in VCL. Not even the native Windows controls have those features.

When time comes, we'll think how to "fix" this. (At first sight i'm against a default custom drawn button)

But then you are not VCL compatible, which was told repeatedly to me, is THE goal of LCL.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Paul Ishenin
to Graeme Geldenhuys
Graeme Geldenhuys wrote
But then you are not VCL compatible, which was told repeatedly to me, is THE goal of LCL

Nobody told about compatibility with the most recent vcl version. To be D7 compatible is enough for the first step.

Best regards,
Paul Ishenin.

Reply by email

Michael Van Canneyt
to Mattias Gärtner
Mattias G?rtner wrote
BTW, the new TEdit.OnlyNumber property is a joke, is it not?

I doubt this.
This is a feature of the WinAPI which Borland simply forgot to implement all these years. So they finally decided to do it (it's about 3 lines of code to do so)

Michael.

Reply by email

Graeme Geldenhuys
to Mattias Gärtner: An embedded and charset-unspecified text was scrubbed... Name: not available Url:…
Mattias G?rtner wrote
Delphi works around some limits of the windows 'controls'. Other widgetsets don't have this limit.

I'm not disputing that.

TBitBtn has an icon and is not custom drawn under all widgetsets.

True, it's "native" under fpGUI as well. ;-)

VCL compatibility does not mean copying implementation. In fact, this is forbidden under most laws.

Why must you "copy the implementation", LCL can implement it itself. It's not rocket science to draw a bitmap on a button, I done that ages ago in fpGUI. And if you have to implementation custom drawn under Windows, why not simply use that for all widgetsets? That way it's consistent on all widgetsets and not duplicate work. Or does that hit the stumbling block of "it's not native"? This is starting to sound like the Chicken & Egg situation! :)

But I see what you are up to:

;-)

But how to use the new richedit control under msegui? With the LCL you can easily write a control using it (windows only). What about fpgui?

TSynEdit is richedit control is it not? Oh, and it's custom drawn. And to answer your question about RichEdit and fpGUI. I am planning on implementing such a control or port one of the freely available ones on the Net.

eg: Have a look at TMS's Advanced Memo component. It's exactly like Delphi 2007's editor - and they call it a MEMO! I call it a memo on steroids! :)
http://www.tmssoftware.com/site/advmemo.asp

BTW, the new TEdit.OnlyNumber property is a joke, is it not?

That's what I thought too!

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Boian Mitov
to Marc Weustink: So ? This means that this has to be done by the LCL or by the widgetset ? I'm not in a…

I agree with Mark. It is more important to first improve, and add some of the missing core functionality than to start adding bells and whistles to the buttons and the memos, that few people will probably use.

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 12 lines
----- Original Message ----- From: "Marc Weustink" To: "General mailing list" Sent: Thursday, August 07, 2008 2:49 AM Subject: Re: [Lazarus] TButton must now become a custom draw component > I'm not in a hurry to implement all those fancy new stuff. Better get > something working like D7 first. > When time comes, we'll think how to "fix" this. (At first sight i'm > against a default custom drawn button)

Reply by email

Boian Mitov
to Graeme Geldenhuys: By LCL, because the native widgetsets don't have all those features included in VCL. Not…

Hi Graeme,

It is mater of priorities. I am sure the LCL team would love to add all the VCL features, but there are still missing items in the current component set compare to even D7, and they correctly are looking to fill those voids first before start to add the latest VCL gizmos.

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 9 lines
----- Original Message ----- From: "Graeme Geldenhuys" To: "General mailing list" Sent: Thursday, August 07, 2008 3:07 AM Subject: Re: [Lazarus] TButton must now become a custom draw component > But then you are not VCL compatible, which was told repeatedly to me, > is THE goal of LCL.

Reply by email