Tuesday, March 20, 2012

Embedded GroupBox on Windows ( Feedback #4946 )

While developing the GPSKit Demo application, I've been bitten by a cosmetic issue on Windows XP. It appears that a GroupBox embedded in another GroupBox will have its text displayed incorrectly on this platform. This is known as issue #4946. It has been reported since REALbasic 2008r4.1.

I'm currently developing with Real Studio 2009r4, but I suspect it's still present in the latest version as the report isn't closed. I managed to found a workaround for this issue but I can't report anything in Feedback due to an expired license. So I decided to share it here. The workaround is as simple as putting the following three lines of code in the Open event of the GroupBox

  #if TargetWin32 then
    Me.Parent = Nil
  #endif


And let's create a simple test project ( available here ) and see the result:


Obviously, The 'Orphan GroupBox' is the one that has been... orphaned in its Open event. Of course there is a bad side to this: you're losing the benefits of embedded controls: e.g. setting only the parent as invisible in order to hide all its content. But I'd rather do extra coding on my side than releasing a ugly and incomplete interface for the user.

So, having this fixed in GPSKit Demo, you can now find the version 1.0a2 build for Windows here and for Mac OS X ( universal build ) here. Do not forget to register on our bug tracker system if you're willing to report the issue(s) you've discovered.

No comments:

Post a Comment