Painting of disabled checkboxes not ok

Painting of disabled checkboxes not ok

Postby byte-one » Mon Feb 09, 2009 1:04 pm

The first picture shows normal dialog!
Image

This picture shows, when the status from the checkbox changes from enable to disable. In this case the background from left,top from checkbox to the right,bottom corner of dialog is erased. The text above are disabled by me (not error)!!Image

As tip: This "bug" are not visible, when the following code in METHOD Colors() from TCONTROL are temporarely deleted! Any massage also to send?

Code: Select all  Expand view
SendMessage( ::oWnd:hWnd, WM_ERASEBKGND, hDC, 0 ) // to properly remove/set the dotted rect
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Painting of disabled checkboxes not ok

Postby byte-one » Thu Feb 12, 2009 4:20 pm

Antonio, any suggestion?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Painting of disabled checkboxes not ok

Postby byte-one » Mon May 10, 2010 8:06 am

Antonio, any solution for this problem? I found, this problem are only shown, if the dialog is transparent!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Painting of disabled checkboxes not ok

Postby fgondi » Mon May 10, 2010 10:18 am

Antonio,

Yo tengo el mismo problema con los radiobutton

Code: Select all  Expand view
Redefine Radio oRadio VAR nOpc ID 805,806 OF oDlg
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: Painting of disabled checkboxes not ok

Postby RAMESHBABU » Mon May 10, 2010 11:50 am

Try with this:

Set lTransparent Property of your Group Boxes with .T. as under:

Code: Select all  Expand view
oGroupBox:lTransparent := .T.


It it does not work, please post the code here to give you a solution.

- Ramesh Babu
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Painting of disabled checkboxes not ok

Postby byte-one » Tue May 18, 2010 10:46 am

In Tcontrol method Colors() i change
Code: Select all  Expand view
SendMessage( ::oWnd:hWnd, WM_ERASEBKGND, hDC, 0 ) // to properly remove/set the dotted rect

with
Code: Select all  Expand view
DrawPBack(::hWnd,hDC)

and it seems, that all is functioning! This behavoir is only with lTransparent and themed!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Painting of disabled checkboxes not ok

Postby fgondi » Wed May 19, 2010 2:51 pm

byte-one wrote:In Tcontrol method Colors() i change
Code: Select all  Expand view
SendMessage( ::oWnd:hWnd, WM_ERASEBKGND, hDC, 0 ) // to properly remove/set the dotted rect

with
Code: Select all  Expand view
DrawPBack(::hWnd,hDC)

and it seems, that all is functioning! This behavoir is only with lTransparent and themed!


Funciona perfercto, muchas gracias por la aportación.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: Painting of disabled checkboxes not ok

Postby Antonio Linares » Sat Aug 28, 2010 4:30 pm

The current code is:
Code: Select all  Expand view

            if Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
               // DrawPBack( ::hWnd,  hDC )
               ParentImage( ::hWnd, hDC )
               if Upper( ::ClassName() ) != "TGROUP"
                  SendMessage( ::oWnd:hWnd, WM_ERASEBKGND, hDC, 0 ) // to properly remove/set the dotted rect
               endif  
            endif
 

Are you changing it into: ?
Code: Select all  Expand view

            if Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
               DrawPBack( ::hWnd,  hDC )
            endif
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Painting of disabled checkboxes not ok

Postby Gale FORd » Sat Aug 28, 2010 5:04 pm

I downloaded and installed again. It did not solve my problem. Reading the thread and looking at control.prg It seems you guys are talking about being related to transparency.

I am just using testchk3.prg in the samples folder. No themes, no .rc, and no transparency.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests