Page 1 of 1

Adding PREEVAL o:ClipChildren := .T.

Posted: Fri Dec 04, 2015 10:44 am
by Cliff Wiernik
To make the HILITEGETS GRA_CLR_BLUE clause work properly in Xbase 2.0 under these conditions:

objects displayed in a DCGROUPBOX
themes enabled on a DCTABPAGE
XBPSYSCLR_TRANSPARENT is in use

There currently is a bug in Xbase 2.0. This causes the invalidaterect() method to not work properly.

In 1.9, I overload the default Express++ code that removes the HILITEGETS.

If you are using themes, the default Express++ code removes it by display a GRA_CLR_BACKGROUND line over the original blue line. This, when using themes leaves a light trace on the screen as it is not the same color. I use code from the Xbase++ help file for invalidaterect() to cause the box to be repainted, removing the highlight.

In Xbase 2.0, Alaska is providing a workaround to by setting in the PREEVAL clause the parent of the groupbox's clipChildren instance variable to .T.

I can manually add code to my programs to do this, in about 4-500 places or more. Is there any easier way to make this change for only specific instances. The reason is this may be a temporary workaround once they fix the problem.

Cliff

Re: Adding PREEVAL o:ClipChildren := .T.

Posted: Sat Dec 05, 2015 3:06 am
by Auge_Ohr
Cliff Wiernik wrote:In Xbase 2.0, Alaska is providing a workaround to by setting in the PREEVAL clause the parent of the groupbox's clipChildren instance variable to .T.

I can manually add code to my programs to do this, in about 4-500 places or more. Is there any easier way to make this change for only specific instances. The reason is this may be a temporary workaround once they fix the problem.

Cliff
create you own Class in a separate(!) PRG

Code: Select all

CLASS MyTab FROM XbpTabpage
EXPORTED:
INLINE METHOD Init(oParent, oOwner, aPos, aSize, aPP, lVisible)
   ::XbpTabpage:init( oParent, oOwner, aPos, aSize, aPP, lVisible )
   IF( !EMPTY(oParent),oParent:PREEVAL := .T.,NIL)
RETURN self
INLINE METHOD create(oParent, oOwner, aPos, aSize, aPP, lVisible)
   IF( !EMPTY(oParent),oParent:PREEVAL := .T.,NIL)
   ::XbpTabpage:create( oParent, oOwner, aPos, aSize, aPP, lVisible )
RETURN self
ENDCLASS
now write this into your *.CH File

Code: Select all

#xtranslate XbpTabpage  => MyTab
*.CH File have to include in every *.PRG where you use XbpTabpage.
when you do not need Class MyTab any more just delete #xtranslate in *.CH File ;)

! Note : do not include #xtranslate in CLASS MyTab ...

Re: Adding PREEVAL o:ClipChildren := .T.

Posted: Sat Dec 05, 2015 4:08 pm
by rdonnay
Is there any easier way to make this change for only specific instances.
I don't know what you mean by specific instances.

Are you asking me to change the eXpress++ source code?

Re: Adding PREEVAL o:ClipChildren := .T.

Posted: Mon Dec 07, 2015 8:48 am
by Cliff Wiernik
No changes to express. It is a PDR that hopefully likely will be fixed in early 2016. I can manually add the PREEVAL to my code in the mean time for 2.0 testing but wanted to know if their was an easier way to add the PREEVAL to certain but not all DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX statements which are the parent of a DCGROUPBOX.

There is this new PDR related to :InvalidateRect() not redrawing statics under certain conditions.

http://www.alaska-software.com/scripts/ ... PDRID=6721

I use this method to remove the HILITEGETS box when you are using themes. The default process does not remove it entirely.