we are doing an application that outputs measures to a technician.
We do all the output of the measures in a Table, and we'd like to have
all the products measured in that table control, and be able to select
one product. The "dirty" solution we found now is to use SetTableSelection
to select which cell we want to display on the bottom-left corner.
But that function has obviously not been written for that purpose,
and we are wondering if there's no better solution to achieve that.
thanks for any answer,
--
Bernard Pratz
Chelton Telecom & Microwave
-- Bernard Pratz IT Developer Engineering service Chelton Telecom & Microwave
You're right. There is currently no good solution for forcing the selection to be line-oriented instead of cell-oriented. Of course, you can set the selection programmatically to be the entire row, but then the user can always change it (unless the table is an indicator) which you probably do not want.
Have you considered using a tree control instead? If you're only using string cells, you could probably use a tree control for most uses of a table control. You can make the tree control look pretty much like a table control anyway, and the tree control does allow you to specify line-oriented selection.
thanks for your fast answer, but we had to give up on that : it has been
decided that having too many informations (i.e. measures of all the product's
serie in the same table) is too much for the poor technician...
But what we wanted was not really to _select_ a line, but more to show a
page with all the measures concerning only one diode (the user being able to
move the scrollbar to see the other products' measures in the same serie).
And, by the way, the table _is_ an indicator, as the measures does not
have to be edited 😉
Thanks again,
-- Bernard Pratz IT Developer Engineering service Chelton Telecom & Microwave
I'm not sure I understand completely what you are trying to do. It sounds as if you are simply trying to scroll the table programmatically. Is that true? If not, maybe you can attach a simple screenshot, which might help me visualize the problem.
If you are trying to scroll the table programmatically, the standard way of doing that is by using SetCtrlAttribute (...,ATTR_FIRST_VISIBLE_ROW, <row number>)