10-26-2020 01:02 AM
Hello
So I have a test project that have around 100 test cases, So as the below picture shows, I have all the test step, description, log etc in a listBox,
right now the problem is I definitely cannot put all the table's cells in side of the red color area which is the user interface area, and instead, it will reach out to the down areas quite a lot. I tried to enable the vertical screw bar, but it didn't have any result. so what should I do then, to make sure even I have 100 columns it will also only show around 35(which is the number that the table can fit into the UI). and after the test i can screw down to check all the parameters?
10-26-2020 01:35 AM
The easiest solution is to place one or more splitters to create a pane containing the MCLB and then right click the MCLB and select Fit Control to Pane. That way, it will always fill the pane when the window is resized.
Then, just make sure that the vertical scrollbar of the MCLB itself is visible (right click>>Visible Items) and it will simply be disabled when the user can't scroll. This doesn't require any code, although you might want to update the top-left visible cell to be 0,0 at some points in time.
10-26-2020 02:37 AM
@ericyuan ha scritto:
I tried to enable the vertical screw bar, but it didn't have any result.
The vertical scroll bar should definitely allow you to view all lines. Unless the multicolumn listbox is disabled.
10-26-2020 02:48 AM
You should not show all 100 rows. The scrollbar enables you to show a set of items out of all items. If all items are shown, there will be no scrolling left...
The listbox is grown to outside the panel. If you want to scroll to see the listbox and it's 100 elements, you'd need to show the pane's scrollbar.
As mentioned, the easiest solution is to put the scrollbar on it's own pane (using a splitter) and fit it to the pane. This won't (and you shouldn't force it to) show all 100 items, but it will allow you to scroll through the items that are not visible.
10-26-2020 02:53 AM
I was able to fit into the panel after finish the test, but the problems is in my listBox initialize code, after i set the column to 100 ,the bottom side will extend to the outside of the splitter?
10-26-2020 02:55 AM
OK, that's good to know, I will have a try and use a splitter have a try
10-26-2020 02:59 AM
To be more clear: the suggestion is to NOT set the number of lines/columns at runtime and let the control to resize automatically.
10-26-2020 03:01 AM
OK. I probably will disable that part and then
10-28-2020 04:39 AM
hey Paolo
After i delete the columns value in initialize part, It cannot display the other part which is out of the boundary of UI interface anymore.
but if i add that initialize code, the table at least can show up all the information but it just extend from the bottom side of the UI interface.
I really didn't get more hints from the property of the listbox for solving this problem.
do you have any idea about where could be wrong in my code?
10-28-2020 05:03 AM
If you have a variable number of columns, it's ok to set it at runtime. If not, it's better to set it only at edit time.
I don't really understand what you mean with: the table at least can show up all the information but it just extend from the bottom side of the UI interface. Can you elaborate more?
If you want to set the position into the items table of the first control line programatically, you can do it using the property Top Left Visible Cell.
If the table cannot display more than 36 items (I would say 35), you can't do much apart from using a smaller font and decrease the line height.
But in any case you will never be able to show 100 items at once, so what's wrong in letting the user move up and down with the scrollbar?