Welcome! Log In Create A New Profile

Advanced

[WD] Table control new feature request

Posted by Dimsa 
[WD] Table control new feature request
June 16, 2021 04:33PM
Greetings all,

I'm really in a great need to manually change anchored column of table control. Since I'm almost sure this is a missing feature, and, hopefully I'm not alone in this, can someone, or, preferably, more ppl, ask PC Soft to let us change it through some new Prop of table control ? The reason I cannot send request myself is simple. I'm still "boycotting" WD bc of lack of response to a huge problem they still didn't solve (checked with 25 express), and it was reported back in the days of 22 vers. So, I'd stopped updating since 23.

Sasha
Re: [WD] Table control new feature request
June 16, 2021 06:00PM
Hi,

what's your need exactly?

Kind regards,
Guenter Predl
office@windev.at
Re: [WD] Table control new feature request
June 16, 2021 06:39PM
Hi Guenter,

I need to set anchored column of a table control manually, after a window is started. Users want to hide/unhide columns, and sometimes, one of these columns is an anchored column. I need to set new column using something like MyTable..Anchored = MyTable.Col01..name. Basically, I want the last column to be the anchored always. Now, when I hide last column, it just vanishes, making empty space at the end after resizing.
Re: [WD] Table control new feature request
June 17, 2021 07:06AM
Hi, that's easy. You have to make the sum of all percentages = 100% at first. But you can do that by programming as well. I developed a procedure to reset a Table to it's original settings. You should be able to develop procedures for your needs too - by looking at what I've done.

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

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: