Zebra stripes and FREEZELEFT problem

This forum is for eXpress++ general support.
Message
Author
skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Zebra stripes and FREEZELEFT problem

#1 Post by skiman »

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?
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Zebra stripes and FREEZELEFT problem

#2 Post by skiman »

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.

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)
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.

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
This way it is also working with freezeleft.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Zebra stripes and FREEZELEFT problem

#3 Post by rdonnay »

Thank you. Will do.
The eXpress train is coming - and it has more cars.

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: Zebra stripes and FREEZELEFT problem

#4 Post by Koverhage »

Roger,

can you do this in 258 ?
Klaus

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: Zebra stripes and FREEZELEFT problem

#5 Post by Koverhage »

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
Klaus

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Zebra stripes and FREEZELEFT problem

#6 Post by rdonnay »

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.
The eXpress train is coming - and it has more cars.

User avatar
hz_scotty
Posts: 107
Joined: Thu Jan 28, 2010 8:20 am
Location: Wr.Neustadt / Österreich

Re: Zebra stripes and FREEZELEFT problem

#7 Post by hz_scotty »

v257
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
ZEBRA alone -> works
FREEZELEFT alone -> works
Both -> crashed

Workaround?
Attachments
ERROR DCBROWSE with FREZZE and ZEBRA
ERROR DCBROWSE with FREZZE and ZEBRA
error.jpg (130.29 KiB) Viewed 13385 times
best regards
Hans

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Zebra stripes and FREEZELEFT problem

#8 Post by rdonnay »

Ok, I can reproduce the problem.
Will have a fix or workaround soon.
The eXpress train is coming - and it has more cars.

User avatar
hz_scotty
Posts: 107
Joined: Thu Jan 28, 2010 8:20 am
Location: Wr.Neustadt / Österreich

Re: Zebra stripes and FREEZELEFT problem

#9 Post by hz_scotty »

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.
best regards
Hans

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Zebra stripes and FREEZELEFT problem

#10 Post by rdonnay »

Here is an updated _DCXBROW.PRG that fixes the Zebra problems.
It employs Chris Andries faster solution and also corrects the freezeleft error.
Attachments
_dcxbrow.zip
(28.19 KiB) Downloaded 658 times
The eXpress train is coming - and it has more cars.

Post Reply