In continuation to my above posting, we can extend the logic to generate mini code.
Create a browse, swap columns, resize columns as you like and then call
oBrw:bRClicked := { || MEMOEDIT( QuickCode( oBrw ) }
This the function QuickCode:
function QuickCode( oBrw )
local cCode := ""
cCode := "COLUMNS " + FW_ValToExp( oBrw:cExprs ) + " ;" + CRLF
cCode += "HEADERS " + FW_ValToExp( oBrw:cHeaders ) + " ;" + CRLF
cCode += "COLSIZES " + FW_ArrayAsList( oBrw:nWidths )
return cCode
Output is like this:
COLUMNS {"ID","FIRST","LAST","STREET","CITY","STATE","ZIP","HIREDATE","MARRIED","AGE","SALARY","NOTES"} ;
HEADERS {"ID","FIRST","LAST","STREET","CITY","STATE","ZIP","HIREDATE","MARRIED","AGE","SALARY","NOTES"} ;
COLSIZES 97,146,146,216,216,40,76,76,56,62,104,496
This you can copy and paste in your program