Bookstore

Recent

Author Topic: Changing TGroupBox and TPageControl to custom drawn  (Read 5675 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Changing TGroupBox and TPageControl to custom drawn
« on: July 05, 2010, 10:56:43 pm »
Hello,

I am considering changing the wince implementation of TGroupBox and TPageControl from native to custom drawn.

Basically their associated native controls are rather buggy and problematic. TGroupBox is extremely simple to draw, so it should present no problems. TPageControl may be harder. In both cases I beliave this is the best solution to make those controls reliable and fix the bugs associated with them which are caused by the buggy implementation which Microsoft offers of those controls.

I just thought that it would be good to post this plan here to give people time to express their opinions before I execute it.

DRIGUS

  • Jr. Member
  • **
  • Posts: 59
Re: Changing TGroupBox and TPageControl to custom drawn
« Reply #1 on: July 06, 2010, 10:00:58 am »
Hi.

Neither I can estimate if it is a good idea to customize them, nor I can estimate the effort. But I noticed some problems using TPageControl and TGroupBox the last weeks, too.

E.g. I don't understand why the tab position for a TPageControl on Windows CE is limited to the bottom by the LCL. The OS makes heavily use of top aligned tabs himself, only vertical text seems not to be supported (see http://msdn.microsoft.com/en-us/library/ms927597.aspx). And there are still some painting issues regarding child controls.

After some changes TGroupBox is very useful now, but there are still some problems (e.g. ParentFont and the caption, see attached picture).

As you can see on the attached picture, too, we used a customized Windows CE user interface (see http://msdn.microsoft.com/en-us/library/aa459146(classic).aspx for more information). E.g the TGroupBox has rounded corners. I hope you will keep this in mind, so that a Lazarus application doesn't look like a "foreign body".

« Last Edit: July 06, 2010, 10:05:10 am by DRIGUS »
DRIGUS GmbH

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: Changing TGroupBox and TPageControl to custom drawn
« Reply #2 on: July 06, 2010, 02:47:39 pm »
E.g. I don't understand why the tab position for a TPageControl on Windows CE is limited to the bottom by the LCL. The OS makes heavily use of top aligned tabs himself, only vertical text seems not to be supported (see http://msdn.microsoft.com/en-us/library/ms927597.aspx).

I just changed that. Now top-aligned is also supported.

Quote
And there are still some painting issues regarding child controls.

That's what I ment with microsoft bugs ...

Quote
As you can see on the attached picture, too, we used a customized Windows CE user interface (see http://msdn.microsoft.com/en-us/library/aa459146(classic).aspx for more information). E.g the TGroupBox has rounded corners. I hope you will keep this in mind, so that a Lazarus application doesn't look like a "foreign body".

Well, that significantly increases the difficulty of doing the custom drawing ...