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
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
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
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
But if I next increase the width xBbroseб, the column width (number nStretchCol) will not change
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
METHOD Resize( nSizeType, nWidth, nHeight ) INLINE ( ::ColStretch(), ::Super:ReSize( nSizeType, nWidth, nHeight ), If( ::lPainted, ::Refresh(), ) )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 56 guests