Re: procedure/function assigned to table widget cell? [message #28444] |
Fri, 14 December 2001 05:29 |
timothy.williams
Messages: 20 Registered: October 2001
|
Junior Member |
|
|
I believe I have a solution to my problem. What I did was create a
button that had a procedure that I wanted to execute. (Display the
image whose path was stored in the table cell.) I solved the problem
of tying the button to the table by requiring the button to be in the
same base as the table. Another requirement is that there can be only
on table in this base, then the procedure gets a list of the children
in its base, which the button and table belong to. I then find which
element in the list is a table. Once I find the table, I get get the
value from the table.
For each table/button combination, I can use the same procedure, but
the button has to be in the same base as the table and I my code will
only find the first table in the base before I break out.
I don't know if this is a good way to do this, but it works. I'm
fairly new to IDL programming, so I'm open to better ways.
timothy.williams@nvl.army.mil (Tim Williams) wrote in message news:<faf44c99.0112130529.4773e0e8@posting.google.com>...
> Is there a way to set up a table widget so that if I right-click on a
> table cell I can execute a procedure that will execute a procedure
> where I get the data from the table with /USE_TABLE_SELECT (or is it
> /USE_TEXT_SELECT? I don't have the manual handy. Sorry.) I want to
> select a single cell of a table and do something with it. I don't want
> to do the procedure everytime the cell is selected, but only when
> something else like a button press or something happens. I was trying
> to put a button in the same top level base, but couldn't figure out
> how to tie the two together. I need this functionality in more than
> one table, so it needs to be somewhat general.
>
> Thanks for any help.
>
> Tim Williams
|
|
|