|
|
On 2020-10-18 10:45, Aditya Mudaliar wrote:
> Hi
> i am using Ubuntu 18.04.5 LTS using fltk version 1.3.5
> i am trying to get data from a selected cell of Fl_Table_Row,btw i have stored the data in a map
> trying to display the OrderId field in the Fl_Output* that is g_Fields.pOrderId
> which is in draw_cell of class DemoTable
> line no 222 in the attached file SendOrder.cpp
> i am using the class from Erico's Examples.
> its being redrawn only after i change my mouse focus to it.
> i have already tried
> g_Fields.pOrderId->redraw();
You have to set the value of the Fl_Output in your table_cb().
Just add this to the bottom of table_cb():
// Set the "Orderid" output to the clicked on table row
string val = std::to_string(table->callback_row()); // int -> string
g_Fields.pOrderId->value(val.c_str()); // set string value
I'm assuming here the orderid == table row#.
If not, then use the callback_row() value to index the array
that has the orderid info.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/cb9faaf9-29e0-9485-2cd7-1d4e81aa5dfd%40seriss.com.
[ Direct Link to Message ] | |
|
| |