Welcome! Log In Create A New Profile

Advanced

Store the Column Configuration [in tables] - WINDEV

Posted by StevenSitas 
Store the Column Configuration [in tables] - WINDEV
November 07, 2018 11:47AM
Hi,
has anyone succesfully used the "Store Column Configuration" in WD21 ?
My users [and I have seen it also] are reporting that from time to time their configuration(s) [on tables] gets "lost or reinitialized".

I know that everything is reinitialized automatically when I install new versions of an application, but it seems to happen in everyday use, without installing a new version.
And it does not matter if I use the registry or an XML to store the settings ...
I was hopping for a runtime switch to turn OFF the "Store Column Configuration" per table - but I cannot find any info in the docs ..

Any Ideas?

Regards
Steven Sitas
Re: Store the Column Configuration [in tables] - WINDEV
November 07, 2018 06:50PM
Hi Steven,

may be some FAA function?

Regards, Stefan

Regards, Stefan



Edited 1 time(s). Last edit at 11/07/2018 06:51PM by Stefan B..
Re: Store the Column Configuration [in tables] - WINDEV
November 08, 2018 05:13AM
Hi, the function for a reset is:

(prerequesite is to have 100% column anchoring in total!)

You can add this function to the Global functions of your project.

Add a call to ResetColumnConfiguration() as a menue item to the popup of your Table control.

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

RETURN
Re: Store the Column Configuration [in tables] - WINDEV
November 08, 2018 09:12AM
Hi,
and thanks everybody for your answers.
But I probably didn't make clear my problem:

the problem, as I stated in my post,is that the .ini (or XML) configuration files FREQUENTLY get RESET automatically.
And my end users are getting "angry" ...
So I thought I could play with the setting "Store the Column Configuration" and see what happens.
BUT I cannot find a way to control it in runtime ...

I was hopping to stay away from using TableMoveColumn()

Regards
Steven Sitas
Re: Store the Column Configuration [in tables] - WINDEV
November 09, 2018 07:49AM
Hi Steve, why not build your own INI file for the most used tables in your application? Each time the window is closed you could write the current adjustments to the INI file. You can add a menue entry in the AAF-Menue of the Tables and offer to restore the last configuration from last closing. The group would be UserName.WindowName.TableName, so, you could have a single INI file for the whole application and for each user on a certain computer. If the INI file grows too large then give one INI file to each user. I'm using that to increase/decrease/restore font sizes of the Tables. I do mistrust those settings in the Registry anyway.
Re: Store the Column Configuration [in tables] - WINDEV
November 09, 2018 09:57AM
Hi Guenter (?),

I was hoping for a global setting to force the "Store Column Configuration" ON or OFF.
The AAF is realy great at the UI level and I wouldn't like to loose it [or recreate it].

The good thing is that the problem happens on our older WD apps and not the ones that use our new UI [based on alpha360].
Seems like it is time to start upgrading old users to newer versions ..

Regards
Steven Sitas
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: