Welcome! Log In Create A New Profile

Advanced

WD24 double click column

Posted by jtadebruin 
WD24 double click column
September 17, 2019 04:19PM
Hey

When i double click is this situation all colums are made equal an fitting on the screen.


Can I do this programatically?



Edited 1 time(s). Last edit at 09/17/2019 04:20PM by jtadebruin@gmail.com.
Attachments:
open | download - DK_KOLOM.png (12 KB)
Re: WD24 double click column
September 17, 2019 04:45PM
Hi, I don't understand what you want to achieve exactly but ... I have a global procedure which will sort all visible columns to the original order and will put their width proportional to the original width in order to fill the table control. You need:

- in design state, the anchoring of all columns has to sum up to 100%
- in design state, all columns have to fill the table control

This procedure will work for any table control satisfying the conditions above. You just have to add a call to the procedure to the AAF-Menue of the table.

PROCEDURE ResetColumnConfiguration()

TC,TX, TW, TD are int
PopName is string = PopupField()
TN is string

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

TableDisplay(PopName,taInit)

RETURN

Kind regards,
Guenter Predl
office@windev.at
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: