Not working nStretchCol (xBrowse )

Not working nStretchCol (xBrowse )

Postby Natter » Tue May 08, 2018 6:07 am

I have recompiled their programs under FWH18.03 (xHarbour ) In xBrowse has stopped working option nStretchCol. In version 17.12 it's Ok
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Not working nStretchCol (xBrowse )

Postby nageswaragunupudi » Tue May 08, 2018 10:23 am

StretchCol has been working in all versions including 18.03.

Sample without stretch col:
Code: Select all  Expand view
  local oDlg, oBrw

   USE CUSTOMER

   DEFINE DIALOG oDlg SIZE 800,300 PIXEL TITLE FWVERSION + " STRETCH NONE"

   @ 10,10 XBROWSE oBrw SIZE 380,130 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "FIRST","CITY","SALARY" ;
      AUTOCOLS CELL LINES NOBORDER

   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED
 

Image

STRETCHCOL_LAST:
Code: Select all  Expand view
  local oDlg, oBrw

   USE CUSTOMER

   DEFINE DIALOG oDlg SIZE 800,300 PIXEL TITLE FWVERSION + " STRETCHCOL_LAST"

   @ 10,10 XBROWSE oBrw SIZE 380,130 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "FIRST","CITY","SALARY" ;
      AUTOCOLS CELL LINES NOBORDER

   oBrw:nStretchCol  := STRETCHCOL_LAST
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

 

Image

STRETCHCOL_WIDEST (recommended)
Code: Select all  Expand view
  USE CUSTOMER

   DEFINE DIALOG oDlg SIZE 800,300 PIXEL TITLE FWVERSION + " STRETCHCOL_WIDEST (recommended)"

   @ 10,10 XBROWSE oBrw SIZE 380,130 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "FIRST","CITY","SALARY" ;
      AUTOCOLS CELL LINES NOBORDER

   oBrw:nStretchCol  := STRETCHCOL_WIDEST
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

 

Image

STRETCHCOL <number>
Code: Select all  Expand view
  local oDlg, oBrw

   USE CUSTOMER

   DEFINE DIALOG oDlg SIZE 800,300 PIXEL TITLE FWVERSION + " STRETCHCOL <specified>"

   @ 10,10 XBROWSE oBrw SIZE 380,130 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "FIRST","CITY","SALARY" ;
      AUTOCOLS CELL LINES NOBORDER

   oBrw:nStretchCol  := 1
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED
 

Image

It is working as expected.
Regards

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

Re: Not working nStretchCol (xBrowse )

Postby Natter » Tue May 08, 2018 12:10 pm

It's all so if you do not change the width xBbrose. But if I next increase the width xBbroseб, the column width (number nStretchCol) will not change
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Not working nStretchCol (xBrowse )

Postby nageswaragunupudi » Tue May 08, 2018 12:15 pm

But if I next increase the width xBbroseб, the column width (number nStretchCol) will not change


I do not understand.
Can you clearly explain, please?
Regards

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

Re: Not working nStretchCol (xBrowse )

Postby Natter » Tue May 08, 2018 12:23 pm

l
Code: Select all  Expand view
ocal oBrw
private oDlg

   USE CUSTOMER

   DEFINE DIALOG oDlg SIZE 800,300 PIXEL TITLE FWVERSION + " STRETCHCOL_LAST"

   @ 10,10 XBROWSE oBrw SIZE 380,130 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "FIRST","CITY","SALARY" ;
      AUTOCOLS CELL LINES NOBORDER

   oBrw:nStretchCol  := STRETCHCOL_LAST
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg  ON INIT  MY_INI()  CENTERED
return NIL

procedure My_Ini
oDlg:nWidth+=100
oDlg:aControls[1]:nWidth+=100
return
 
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Not working nStretchCol (xBrowse )

Postby nageswaragunupudi » Tue May 08, 2018 12:47 pm

You are right.
Thanks for pointing out.

Please re-insert this line anywhere in the class declaration of xbrowse (where the method resize is commented out):
Code: Select all  Expand view
  METHOD Resize( nSizeType, nWidth, nHeight ) INLINE ( ::ColStretch(), ::Super:ReSize( nSizeType, nWidth, nHeight ), If( ::lPainted, ::Refresh(), ) )
 
Regards

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

Re: Not working nStretchCol (xBrowse )

Postby Natter » Tue May 08, 2018 1:43 pm

Thank You Mr.Rao. Work correctly
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Not working nStretchCol (xBrowse )

Postby dagiayunus » Tue May 08, 2018 7:16 pm

Dear Mr.Rao

The screen resolution is vary on my desktop and laptops.

How can I autofit column (stretch or srink) according to the resolution ?

I have sent screenshot of my application to you.

Regards

Yunus.
Regards
Yunus

FWH 21.02
dagiayunus
 
Posts: 85
Joined: Wed Nov 19, 2014 1:04 pm

Re: Not working nStretchCol (xBrowse )

Postby José Luis Sánchez » Wed May 09, 2018 3:29 pm

Thanks Mr. Rao, I didn't know this feature of xbrowse and it is very nice !!!

Regards,
José Luis
User avatar
José Luis Sánchez
 
Posts: 556
Joined: Thu Oct 13, 2005 9:23 am
Location: Novelda - Alicante - España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 50 guests