change the ndatalines (xbrowse) on line - RESOLVED -

change the ndatalines (xbrowse) on line - RESOLVED -

Postby Silvio.Falconi » Fri May 12, 2023 1: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: Select all  Expand view
 :bStrData := { || oDbf:Street + CRLF +oDbf:city+" "+ oDbf:state }


Image


the user by a menu popup can change the configuration and set more rows
on command of menu I made

Code: Select all  Expand view

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 ?
Last edited by Silvio.Falconi on Sat May 13, 2023 9:32 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: change the ndatalines (xbrowse) on lines

Postby Marc Venken » Fri May 12, 2023 8: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.04 with Harbour
User avatar
Marc Venken
 
Posts: 1425
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: change the ndatalines (xbrowse) on lines

Postby nageswaragunupudi » Sat May 13, 2023 1: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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: change the ndatalines (xbrowse) on lines

Postby nageswaragunupudi » Sat May 13, 2023 1: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: Select all  Expand view
     COLUMNS "ID", "FIRST+CHR(13)+CHR(10)+LAST", ;
 

is not correct
Code: Select all  Expand view
     COLUMNS "ID", "FIRST"+CHR(13)+CHR(10)+"LAST", ;
 

is correct.
You can use CRLF also.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: change the ndatalines (xbrowse) on lines

Postby Silvio.Falconi » Sat May 13, 2023 9: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
Image

two rows

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests