N.Marzio Posted April 29, 2020 Share Posted April 29, 2020 Is it possible to configure the size of the columns in %? Example : Column1 width 20% Column2 width 10% Column3 width 40% Column4 width 15% Column5 width 15% Quote Link to comment Share on other sites More sharing options...
Kast2k Posted May 1, 2020 Share Posted May 1, 2020 ClientEvents -> ExtEvents function boxready(sender, width, height, eOpts) { ajaxRequest(form1.dbgData, 'updatedbgSize', ['w='+form1.dbgData.getWidth(), 'h='+form1.dbgData.getHeight()]); } procedure Tform1.dbgDataAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var w:integer; a:string; begin if (EventName='updatedbgSize') then begin a:=Params.Text; w:=StrToIntDef(Params.Values['w'],100); dbgData.Columns[0].Width:=trunc(w*0.06); dbgData.Columns[1].Width:=trunc(w*0.06); dbgData.Columns[2].Width:=trunc(w*0.055); dbgData.Columns[3].Width:=trunc(w*0.07); dbgData.Columns[4].Width:=trunc(w*0.07); dbgData.Columns[5].Width:=trunc(w*0.07); dbgData.Columns[6].Width:=trunc(w*0.07); dbgData.Columns[7].Width:=trunc(w*0.16); dbgData.Columns[8].Width:=trunc(w*0.07); dbgData.Columns[9].Width:=trunc(w*0.09); dbgData.Columns[10].Width:=trunc(w*0.07); dbgData.Columns[11].Width:=trunc(w*0.06); dbgData.Columns[12].Width:=trunc(w*0.08); dbgData.Refresh; end; end; Quote Link to comment Share on other sites More sharing options...
N.Marzio Posted May 1, 2020 Author Share Posted May 1, 2020 Thanks. But when the browser is resized, the dimensions of the grid are not reduced Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.