FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour change the ndatalines (xbrowse) on line - RESOLVED -
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
change the ndatalines (xbrowse) on line - RESOLVED -
Posted: Fri May 12, 2023 01:13 PM
Initially a test line in the browse consists of a single example line

WITH OBJECT oBrw
IF lmore
:nDataLines := 2
ELSE
:nDataLines := 1
ENDIF

...
END

Code (fw): Select all Collapse
  :bStrData := { || oDbf:Street + CRLF +oDbf:city+" "+ oDbf:state }



the user by a menu popup can change the configuration and set more rows
on command of menu I made
Code (fw): Select all Collapse
Function oBtnMenu2(oBrw,oDbf,oParent,cSection,nRow,nCol)
   local oMenu,oItem1
  MENU oMenu POPUP
 MENUITEM oItem1 PROMPT "More Rows" ;
      ACTION (lMore := !lMore,;
                 ( IIF( lMore,oBrw:nDataLines := 2,oBrw:nDataLines := 1 ),;
                   oBrw:refresh()) )
      ENDMENU
      oItem1:SetCheck(lMore)
     ACTIVATE POPUP oMenu OF oParent AT  oBrw:nTop+nRow, oBrw:nLeft+nCol
return nil
Why not refresh the oBrw ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: change the ndatalines (xbrowse) on lines
Posted: Fri May 12, 2023 08:16 PM

Silvio,

Please try : chr(13)+chr(10) in stead of CRLF

  COLUMNS "ID", "FIRST+CHR(13)+CHR(10)+LAST", ;

     "STREET+CHR(13)+CHR(10)+CITY+CHR(13)+CHR(10)+STATE+ '-' + ZIP" ;

  HEADERS "ID", "NAME", "ADDRESS" ;

I can be wrong ))))

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: change the ndatalines (xbrowse) on lines
Posted: Sat May 13, 2023 01:02 AM

nDataLines is used by xbrowse only while creating the browse for the first time for calculating the row height. After creation of the browse. i.e., during runtime, it is never used and changing the values does not do anything.

During runtime, you can change the data oBrw:nRowHeight.

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: change the ndatalines (xbrowse) on lines
Posted: Sat May 13, 2023 01:06 AM
Marc Venken wrote:Silvio,

Please try : chr(13)+chr(10) in stead of CRLF

COLUMNS "ID", "FIRST+CHR(13)+CHR(10)+LAST", ;
"STREET+CHR(13)+CHR(10)+CITY+CHR(13)+CHR(10)+STATE+ '-' + ZIP" ;
HEADERS "ID", "NAME", "ADDRESS" ;

I can be wrong ))))
Not correct.
chr(13)+chr(10) or CRLF should not be inside the quotes.
Code (fw): Select all Collapse
      COLUMNS "ID", "FIRST+CHR(13)+CHR(10)+LAST", ;
is not correct
Code (fw): Select all Collapse
      COLUMNS "ID", "FIRST"+CHR(13)+CHR(10)+"LAST", ;
is correct.
You can use CRLF also.
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: change the ndatalines (xbrowse) on lines
Posted: Sat May 13, 2023 09:25 AM
nageswaragunupudi wrote:nDataLines is used by xbrowse only while creating the browse for the first time for calculating the row height. After creation of the browse. i.e., during runtime, it is never used and changing the values does not do anything.
During runtime, you can change the data oBrw:nRowHeight.
thanks run correctly

this is only a test

one row


two rows

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion