[WD] Table control new feature request June 16, 2021 04:33PM |
Registered: 4 years ago Posts: 5 |
Re: [WD] Table control new feature request June 16, 2021 06:00PM |
Admin Registered: 5 years ago Posts: 501 |
Re: [WD] Table control new feature request June 16, 2021 06:39PM |
Registered: 4 years ago Posts: 5 |
Re: [WD] Table control new feature request June 17, 2021 07:06AM |
Admin Registered: 5 years ago Posts: 501 |
PROCEDURE ResetColumnConfiguration(TableName is ANSI string) TC,TX, TW, TD are int PopName is ANSI string TN is string IF TableName = "" THEN PopName = ControlPopupOwner() ELSE PopName = TableName END TC = TableCount(PopName,toColumn) FOR TX = 1 TO TC TN = TableEnumColumn(PopName,TX) TableMoveColumn(PopName,TN,TX) IF {PopName+"."+TN,indControl}..InitialVisible = False THEN {PopName+"."+TN,indControl}..Visible = False ELSE {PopName+"."+TN,indControl}..Visible = True END END FOR TX = 1 TO TC TN = TableEnumColumn(PopName,TX) {PopName+"."+TN,indControl}..Width = {PopName+"."+TN,indControl}..InitialWidth IF {PopName+"."+TN,indControl}..Visible = True THEN TW += {PopName+"."+TN,indControl}..Width END END TD = {PopName,indControl}..Width - TW - 18 // 18 ~= Width of vertical scrollbar of Table FOR TX = 1 TO TC TN = TableEnumColumn(PopName,TX) {PopName+"."+TN,indControl}..Width += TD * {PopName+"."+TN,indControl}..AnchorRateWidth / 1000 END RETURN