DCBROWSE issues still

This forum is for eXpress++ general support.
Post Reply
Message
Author
reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

DCBROWSE issues still

#1 Post by reganc »

We are still having a couple of issues related to the use of multirow columns with presentation parameters.

We have a DCBROWSE like the below:

Code: Select all

@ nROW,nCOL DCBROWSE aSEEK[SK_BROWSE] ;
         DATA aSEEK[SK_ARRAY] ;
         SIZE nBrowWid,nBrowHgt+Rba_Row(0.5)+nNavBtnHgt ;
         POINTER aSEEK[SK_POINTER] ;
         GOTFOCUS {|u1,u2,o| oFSBar_Browse:show() } ;
         LOSTFOCUS {|u1,u2,o| oFSBar_Browse:hide() } ;
         ITEMMARKED {|| dc_getrefresh(aPLU[PLU_EL_GETLIST],,,,"UPDATE") } ;
         ITEMSELECTED {|| PostAppEvent(xbeP_Activate,,,aPLU[PLU_EL_OBJ_ACCEPT]) } ;
         FONT Rba_SayFont() ;
         PRESENTATION BROW_PRES_NORMAL(iif(lTouch,rba_row(2),NIL)) ;
         TABSTOP ;
         SORTSCOLOR SortColour()[1] , SortColour()[2] ;
         SORTUCOLOR SortColour()[3] , SortColour()[4] 

      DCBROWSECOL ;
         ELEMENT EL_PART;
         HEADER "Part" ;
         PROTECT {||.t.} ;
         WIDTH Rba_Col(13) ;
         PRESENTATION BROW_PRES_NORMAL(iif(lTouch,rba_row(2),NIL)) ;
         SORT {|| sort_col(aSEEK[SK_ARRAY],EL_PART,.t.) } _LEFTBUTTON lTouch ;
         PARENT aSEEK[SK_BROWSE]

         DCBROWSECOL ;
            DATA {{|| split_description(alltrim(dc_getcolarray(EL_DESCRIPTN,aSEEK[SK_BROWSE])),ZDESCLEN_41-10,.t.)  }} ;
            HEADER "Description" ;
            WIDTH Rba_Col(ZDESCLEN_41-7) ; //was 38
            PRESENTATION BROW_PRES_NORMAL(iif(lTouch,rba_row(2),NIL)) ;
            SORT {|| sort_col(aSEEK[SK_ARRAY],EL_DESCRIPTN,.t.) } _LEFTBUTTON lTouch ;
            PARENT aSEEK[SK_BROWSE ]

         DCBROWSECOL ;
            DATA {||ntrim(dc_getcolarray(EL_RRP,aSEEK[SK_BROWSE]),10,2)};
            HEADER "RRP" ;
            WIDTH Rba_Col(8) ;
            PRESENTATION BROW_PRES_NORMAL_RIGHT(iif(lTouch,rba_row(2),NIL)) ;
            SORT {|| sort_col(aSEEK[SK_ARRAY],EL_RRP,.t.) } _LEFTBUTTON lTouch ;
            PARENT aSEEK[SK_BROWSE ]
Notice that the 2nd column is the only column that uses an array to get a multirow cell display. Also, this browse is optimised for Touch screen display by manipulation of the row height in the presentation parameters.

This produces a browse where the 1st and 3rd column only has a single row cell and the 2nd column has a 2 row cell as expected.

But there is a problem with it. The heading row on the 2nd row is larger by a couple of pixels than the 1st and 3rd column headings.
DCBROWSE PLU Example1.PNG
DCBROWSE PLU Example1.PNG (5.38 KiB) Viewed 6836 times
There is one other oddity with this. For reference, the browse highlight is black on yellow and the data cells are black on white.

If I comment out the presentation parameters line from the DCBROWSE, the headings line up just fine but when you move the highlight to the 2nd column the highlighted cell colours are now white on yellow.
DCBROWSE PLU Example2.PNG
DCBROWSE PLU Example2.PNG (5.11 KiB) Viewed 6836 times
Has anyone else seen anything like this?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

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

Re: DCBROWSE issues still

#2 Post by rdonnay »

Regan -

The MULTIROW browse was not an easy thing to write because of Xbase++ color issues.

This is why I replaced it with a much better solution.

I suggest that you look at the following sample programs:

\exp20\samples\browse\generic.prg
\exp20\samples\browse\calendar.prg

BTW - Will you and your boss consider coming to the European devcon?
The eXpress train is coming - and it has more cars.

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: DCBROWSE issues still

#3 Post by reganc »

rdonnay wrote:Regan -

The MULTIROW browse was not an easy thing to write because of Xbase++ color issues.

This is why I replaced it with a much better solution.

I suggest that you look at the following sample programs:

\exp20\samples\browse\generic.prg
\exp20\samples\browse\calendar.prg
Thanks I'll have a look at that...
rdonnay wrote:BTW - Will you and your boss consider coming to the European devcon?
I've asked him...he is mulling it over at present.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Post Reply