Zebra stripes and FREEZELEFT problem
Zebra stripes and FREEZELEFT problem
Hi,
While implementing the Zebra stripes of Jack Duijf in my application I had some browses with problems. The browse didn't appear on the screen. The application isn't crashing, but the browse wasn't shown.
After looking to these browses I came to the conclusion that all my browses which are using FREEZELEFT had this problem. After disabling the FREEZELEFT, these browses also appeared without problem.
Maybe someone already encountered this problem? Any solution for this?
While implementing the Zebra stripes of Jack Duijf in my application I had some browses with problems. The browse didn't appear on the screen. The application isn't crashing, but the browse wasn't shown.
After looking to these browses I came to the conclusion that all my browses which are using FREEZELEFT had this problem. After disabling the FREEZELEFT, these browses also appeared without problem.
Maybe someone already encountered this problem? Any solution for this?
Re: Zebra stripes and FREEZELEFT problem
Hi Roger,
In an attempt to speed up the zebra, I added the :evenrow to the browse object. Jack added it to the dcbrowsecolumn, but not to the dcbrowse object.
Can you add it to _dcxBrow.prg?
- VAR evenrow for the DC_XbpBrowse class.
- I default evenrow to .F. in the INIT method of dc_xbpbrowse and dc_xbpColumn
- Modification of DrawRow method.
This way the Zebra function can be simplified, and the zebra stripes are a LOT faster. The original getcolumn() in the zebra function takes too much time.
This way it is also working with freezeleft.
In an attempt to speed up the zebra, I added the :evenrow to the browse object. Jack added it to the dcbrowsecolumn, but not to the dcbrowse object.
Can you add it to _dcxBrow.prg?
- VAR evenrow for the DC_XbpBrowse class.
- I default evenrow to .F. in the INIT method of dc_xbpbrowse and dc_xbpColumn
- Modification of DrawRow method.
Code: Select all
METHOD DC_XbpColumn:DrawRow(nP1,xP2)
::LastRow := nP1 + ::nOffset
::EvenRow := (Abs(::LastRow) % 2) = 0
::parent:evenrow := ::evenrow
RETURN ::XbpColumn:DrawRow(nP1,xP2)
Code: Select all
Function Zebra(oBrowseOrCol)
****************************
LOCAL aRet := {GRA_CLR_BLACK,GRA_CLR_WHITE} // Default black/white
LOCAL lEvenRow
if valtype( lEvenRow:= oBrowseorCol:EvenRow ) == "L" .and. lEvenrow
aRet := {GRA_CLR_BLACK,GRA_CLR_YELLOW}
endif
Return aRet
Re: Zebra stripes and FREEZELEFT problem
Thank you. Will do.
The eXpress train is coming - and it has more cars.
Re: Zebra stripes and FREEZELEFT problem
Roger,
up to build 254 i this work
COLOR { |o| Zebra(o) }
with build 257 this does not work.
With build 257 this work only if i change o to oBrowse
up to build 254 i this work
COLOR { |o| Zebra(o) }
with build 257 this does not work.
With build 257 this work only if i change o to oBrowse
Klaus
Re: Zebra stripes and FREEZELEFT problem
The latest changes to the colors and presentation of the browse system were added by Jack Duijf.
I thought that I had given it all a good test by running all of my applications, but I apparently missed a few things.
Tom Liehr reported similar problems with the color system.
I am trying to work through these issues and will have a fix in build 258.
I thought that I had given it all a good test by running all of my applications, but I apparently missed a few things.
Tom Liehr reported similar problems with the color system.
I am trying to work through these issues and will have a fix in build 258.
The eXpress train is coming - and it has more cars.
Re: Zebra stripes and FREEZELEFT problem
v257
ZEBRA und FREEZE reported this
ZEBRA alone -> works
FREEZELEFT alone -> works
Both -> crashed
Workaround?
ZEBRA und FREEZE reported this
Code: Select all
@ 3,1 DCBROWSE ::oBrowse ALIAS ::ARTSTAMM SIZE 135+nBreite,27+nHoehe;
CURSORMODE XBPBRW_CURSOR_ROW;
PRESENTATION aPres ; //
ITEMSELECTED {|| DoA_Zeig(::ARTSTAMM,::lNew), ::oBrowse:refreshall() ,DC_SetAppFocus(::eSeek) };
WHEN {|| !(::ARTSTAMM)->(Eof())} ;
SCOPE ;
USEVISUALSTYLE ;
FREEZELEFT {1} ;
ZEBRA aEvenRowColor,aOddRowColor
FREEZELEFT alone -> works
Both -> crashed
Workaround?
- Attachments
-
- ERROR DCBROWSE with FREZZE and ZEBRA
- error.jpg (130.29 KiB) Viewed 15875 times
best regards
Hans
Hans
Re: Zebra stripes and FREEZELEFT problem
Ok, I can reproduce the problem.
Will have a fix or workaround soon.
Will have a fix or workaround soon.
The eXpress train is coming - and it has more cars.
Re: Zebra stripes and FREEZELEFT problem
Thanks for Workaround!
Another Problem with ZEBRA Color is, when you scroll the browse beyond the right side of the screen
the fields of view are no longer Zebra.
The Color looks like the 1st line in the Browse. Gray in my case.
Perhaps if you scroll to right or left and up and down sometimes Zebra is back ok but mostly not.
Another Problem with ZEBRA Color is, when you scroll the browse beyond the right side of the screen
the fields of view are no longer Zebra.
The Color looks like the 1st line in the Browse. Gray in my case.
Perhaps if you scroll to right or left and up and down sometimes Zebra is back ok but mostly not.
best regards
Hans
Hans
Re: Zebra stripes and FREEZELEFT problem
Here is an updated _DCXBROW.PRG that fixes the Zebra problems.
It employs Chris Andries faster solution and also corrects the freezeleft error.
It employs Chris Andries faster solution and also corrects the freezeleft error.
- Attachments
-
- _dcxbrow.zip
- (28.19 KiB) Downloaded 845 times
The eXpress train is coming - and it has more cars.