Page 1 of 1

urrent status of dcbrowse & 2.0

Posted: Fri Aug 21, 2015 8:58 am
by bwolfsohn
I finally have our applications running under 2.0. The first thing i see is the browse row height is to small. I read previous msgs from a couple of months ago, but i'm wondering what the current thought is on how best to deal with this, since the code has to be 1.9 compatible.

2.0 version 554, since i still don't have my product key to upgrade.

Re: urrent status of dcbrowse & 2.0

Posted: Fri Aug 21, 2015 9:33 am
by Cliff Wiernik
I have not yet gotten back to 2.0 testing but I did have issues with browses also. I thought Roger might have changed some defaults in 261 to address this. In my initial testing back from last October at the SWXbase++ devcon, I was using this

Code: Select all

*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+                                                     
*+      FUNCTION LB_SetSize(n1,n2)                                              // PC CAW 10-17-14 added for Xbase++ 2.0
*+
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+
FUNCTION LB_SetSize(n1,n2)
  LOCAL nSize

  IF version(1)+'.'+version(2)+'.'+version(3) > '1.9.355'
    nSize := n2
  ELSE
    nSize := n1
  ENDIF

  RETURN nSize
      


And this change to my browse code.

Code: Select all

      { XBP_PP_COL_DA_ROWHEIGHT, LB_SetSize(13.75,14) },  /* Row Height       */  ;             // 13   // PC CAW 10-17-14 added LB_SetSize()
      { XBP_PP_COL_DA_CELLHEIGHT, LB_SetSize(13.75,-1) }, /* Cell Height      */  ;             // 13   // PC CAW 10-17-14 added LB_SetSize()
;//      { XBP_PP_COL_DA_CELLALIGNMENT, XBPALIGN_LEFT+XBPALIGN_VCENTER }, /* Cell Alignment */  ;
      { XBP_PP_COL_HA_HEIGHT, LB_SetSize(13.75,-1) },     /* Header Height    */  ;             // 15   // PC CAW 10-17-14 added LB_SetSize()
To account for differences in height, I modified some values and set some to -1 forcing Xbase++ to determine them. I still used some so that I can reduce the row height a bit. I don't like the default used based on font size as it leaves to much space and prefer to have the rows a little shorter. It does affect the descenders on some of the lower case letters, but I accept that.

Trying to find out where the -1 is described in the Xbase++ documentation.

Re: urrent status of dcbrowse & 2.0

Posted: Sat Aug 22, 2015 6:16 am
by rdonnay
Brian -

By default 2.0 sets the row height in presentation parameters to -1.
This calculates the height based on the font size.

You will need to give it a specific value in 2.0.

Roger

Re: urrent status of dcbrowse & 2.0

Posted: Mon Aug 24, 2015 2:30 am
by reganc
rdonnay wrote:Brian -

By default 2.0 sets the row height in presentation parameters to -1.
This calculates the height based on the font size.

You will need to give it a specific value in 2.0.

Roger
Wasn't there also a bug in the XbpBrowse row sizing code that caused rows to be displayed 6 pixels bigger than you explicitly set in the presentation parameters?

Re: urrent status of dcbrowse & 2.0

Posted: Mon Aug 24, 2015 6:15 am
by rdonnay
Wasn't there also a bug in the XbpBrowse row sizing code that caused rows to be displayed 6 pixels bigger than you explicitly set in the presentation parameters?
I'm not aware of this.

Re: Current status of dcbrowse & 2.0

Posted: Mon Aug 24, 2015 9:07 am
by reganc
rdonnay wrote:
Wasn't there also a bug in the XbpBrowse row sizing code that caused rows to be displayed 6 pixels bigger than you explicitly set in the presentation parameters?
I'm not aware of this.
Maybe it was just me, then... :-)