Page 1 of 1

VLFOne Size filter & instance list and set column selection

Posted: Wed May 02, 2018 6:49 am
by nic.hall
We have been asked to set the width of the filter and instance list based on the display resolution. We have implemented the width setting for the filter (VF_AC007O) in the uInitialize routine using

#COM_ancestor.width := #fwidth

This is only effective if the BO filter does not have entries in the system clipboard,which is OK.

We have not been able to set the width of the Instance list browser. Tried to set the following 2 properties but neither has any effect;

#AVLISTMANAGER.InstanceListBrowser.Width := #Iwidth
#AVLISTMANAGER.avVisualList.Width := #Iwidth

Any suggestions?

We have also been asked to set the columns that are visible the first time the filter is run but allow the user to use the column selection panel to add columns that are not included in the initial set. Can we set the column selection component values programmatically?

Re: VLFOne Size filter & instance list and set column selection

Posted: Thu May 03, 2018 1:51 am
by caseywhite
You can do the following in the uInitialize, where <2> represents one of your columns.

#AVLISTMANAGER.avVisualList.Columns<2>.Enabled := False

The user can then turn on any of the columns you set to enabled false.

What doesn't work is that if you later decide to programmatically turn columns off/on again the columns selection popup doesn't reflect the fact that you either hid the column or showed it. But it doesn't sound like you care in this case.

What I did notice though is that if you want to show the column programmatically you need to use the following.
#AVLISTMANAGER.avVisualList.columns<2>.columnvisible := True
Setting the Enabled property at this point seems optional. But again doing so won't check the box in the column selection popup even if you also set the Enabled property.

Regarding setting the width of the entire filter pane, I don't see a way to do that. There is #com_owner.avPaneMaximize which changes the width of the window which will expand the list and leave the search portion width untouched. Sounds like it would be ideal if a method #com_owner.avPaneSetWidth and #com_onwer.avPaneSetHeight were added. What avPaneMaximize is using must not be available to the programmer.

Re: VLFOne Size filter & instance list and set column selection

Posted: Thu May 03, 2018 8:41 am
by MarkDale
Note: Although the instance list width cannot be set at run time (as you are requesting), the initial instance list width can be set to a single value, in the framework properties for the business object. (Business object properties --> Instance List tab --> VLF-ONE Instance List Initial Width)

Since the width that the user chooses to set it to will be remembered for that device, and will be used for all subsequent sessions, it did not seem useful to provide a way to override the user's preferred panel width.

The F1 help on the VLF-ONE Instance List Initial Width property gives some details on how the sizing works.
https://docs.lansa.com/14/en/lansa048/c ... lf3210.htm

Re: VLFOne Size filter & instance list and set column selection

Posted: Sat May 05, 2018 6:50 am
by nic.hall
Thanks for the replies.

Casey I have tried the line of code you suggested but it is not working. AM I missing something?

Re: VLFOne Size filter & instance list and set column selection

Posted: Sat May 05, 2018 7:24 am
by caseywhite
Looks like the framework applies the remember settings of which columns were visible/hidden after uInitialize so you need to put in a timer and start it at the end of uInitialize. 25 milliseconds works fine for me. In the time code you need to set the Visible property for the column though. The only drawback is that the ones you have hidden will still show checked when you click on the Select Columns icon. If the goal is to only do this one time then you would need to store the fact that the timer ticked in a database or maybe in local store so that you don't run it again since the system will remember the users choices.

If there was a way to get access to the Select Columns icon so that we have access to turn the check boxes off based on which columns were hidden would be helpful because the user will probably be a bit confused why the check box shows checked when the column isn't visible.

Re: VLFOne Size filter & instance list and set column selection

Posted: Fri May 11, 2018 11:15 pm
by nic.hall
Using the command below allowed us to hide columns in the instance list. This is done on the first display of the filter and then the user can manipulate the column display as required.

#AVLISTMANAGER.avVisualList.columns<12>.columnvisible := False

The problem is that the Column Select popup is not affected by this command and still shows all columns as visible. It also appears that clearing the clipboards has no affect on the Column Select values. Is there a method available to programmatically set the values displayed in the column select popup?

Re: VLFOne Size filter & instance list and set column selection

Posted: Fri Jun 01, 2018 8:42 am
by MarkDale
A new method avListManager.avSetColumnVisibility is coming soon (in VLF epc142005 Hotfix_001).

It allows filters to control column visibility in a way that is reflected in the Column selection menu that the end user sees.