Maybe I can't see the forest for the trees, but I got myself lost working on this problem.
In a 'User-access-rights' portion of a password-management form, I have a page on a pageframe that has 2 listboxes; the left one is initially populated with all available accessible forms, and the right one is for the selected forms for that user. I use the normal drag-and-drop, double-click, directional move buttons (all or selected, including multi-select), etc., and they have all been working properly.
If assigning for a new user, all the available selections properly show in the left listbox and the right one is properly empty. Similarly, if I go to this page via the EDIT button, my Initialize method will initially load the left with ALL forms, then do a multi-select of the already-selected forms from the user-rights table, then execute the MOVE button to move these to the right listbox. So far so good - this all works properly.
The only problem is that sometimes after the method that initializes (via the above MOVE) based on existing selections, the contents of the left listbox are out of sight and I need to use the scrollbars to scroll up to see them. They are always properly there, but the initial visibility seems to depend on what their relative positions were prior to the autoexecution of the MOVE button.
I don't want to automatically go to the top listindex every time the MOVE button is clicked because the user will typically go sequentially down through the alpha-sorted list and choose access rights for the password and move them one at a time, but I do want the initialization of the unselected rights to not need scrolling up, otherwise the administrator may think that there are no unassigned rights available.
I'm probably missing something very simple.
In a 'User-access-rights' portion of a password-management form, I have a page on a pageframe that has 2 listboxes; the left one is initially populated with all available accessible forms, and the right one is for the selected forms for that user. I use the normal drag-and-drop, double-click, directional move buttons (all or selected, including multi-select), etc., and they have all been working properly.
If assigning for a new user, all the available selections properly show in the left listbox and the right one is properly empty. Similarly, if I go to this page via the EDIT button, my Initialize method will initially load the left with ALL forms, then do a multi-select of the already-selected forms from the user-rights table, then execute the MOVE button to move these to the right listbox. So far so good - this all works properly.
The only problem is that sometimes after the method that initializes (via the above MOVE) based on existing selections, the contents of the left listbox are out of sight and I need to use the scrollbars to scroll up to see them. They are always properly there, but the initial visibility seems to depend on what their relative positions were prior to the autoexecution of the MOVE button.
I don't want to automatically go to the top listindex every time the MOVE button is clicked because the user will typically go sequentially down through the alpha-sorted list and choose access rights for the password and move them one at a time, but I do want the initialization of the unselected rights to not need scrolling up, otherwise the administrator may think that there are no unassigned rights available.
I'm probably missing something very simple.