Page 1 of 1
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Sat Nov 04, 2006 2:08 am
by RAMESHBABU
Hello Mr.Antonio
I suspect that there is a bug in FWH 2.8 September + 0.99.1 (Simplex).
When I use TRANSPARENT clause in DIALOGS in WIN98 SE or even
without TRANSPARENT clause in WINXP, the Radio Button prompts and
Check Box prompts are disappearing when the focus is on them as shown
in the following images.
Please advise me the solution.
Regards to you
- Ramesh Babu P
Posted: Sun Nov 05, 2006 8:01 am
by Antonio Linares
Ramesh,
Please place the groups definition in the RC _before_ the controls and redefine them in your code, i.e.:
REDEFINE GROUP ID 5 OF oDlg
... redefine controls contained into it
You may review samples\TestFldb.prg as a sample.
Posted: Sun Nov 05, 2006 11:12 am
by RAMESHBABU
Hello Mr.Antonio
The result of the samples\TestFldb.prg is below.
Regards to you,
- Ramesh Babu P
Posted: Sun Nov 05, 2006 11:45 am
by Antonio Linares
Ramesh,
Then it looks as a themes related issue.
We are going to review it asap, thanks.
Posted: Sun Nov 05, 2006 12:37 pm
by Antonio Linares
Ramesh,
checkboxes get almost fixed with this change in source\classes\control.prg Method Colors():
Code: Select all
if ::lTransparent .and. GetFocus() != ::hWnd
instead of:
if ::lTransparent
We are still doing research for radios.
Posted: Sun Nov 05, 2006 4:13 pm
by RAMESHBABU
Hell Mr.Antonio
Thanks for your attention.
With the fix you have suggested in CONTROL.PRG, the check boxes are
displayed properly now.
As far as RADIO buttons are concerned, unlike earlier now only the
prompt of the current RADIO button on which the focus is present
is disappearing.
Kindly suggest me the proper fix as early as possible.
Regards
- Ramesh Babu P
Posted: Sun Nov 05, 2006 4:21 pm
by Antonio Linares
Ramesh,
We don't have a quick fix for radios.
It looks as the transparency feature just works properly for radios with XP themed dialogs.
You may disable transparency for radios, but it will not look nice.
Posted: Mon Nov 06, 2006 9:54 am
by RAMESHBABU
Dear Mr.Antonio
Here is the fix for METHOD Colors() in CONTROL.PRG for both RADIO
BUTTONS and CHECKBOXES both THEMED AND NON-THEMED situations.
Code: Select all
if ::lTransparent
SetBkMode( hDC, 1 ) // TRANSPARENT
if IsAppThemed()
if ! Empty( ::oBrush:hBitmap )
SetBrushOrgEx( hDC, nBmpWidth( ::oBrush:hBitmap ) - ::nLeft, nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
FillRect( hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
else // This condition is added by RAMESH BABU P on Nov. 06, 2006
if Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO"
DrawPBack( ::hWnd, hDC )
endif
endif
endif
else
if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO"
DrawPBack( ::hWnd, hDC )
endif
endif
and the restult is :
I have tested in all the situations and found it to be working.
Please have look.
Regards to you
- Ramesh Babu P
Posted: Mon Nov 06, 2006 10:40 am
by Antonio Linares
Ramesh,
Excellent!
Many thanks,