GtkD: How to respond to cell edit's?
Johnson via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 18 10:41:56 PDT 2017
On Friday, 18 August 2017 at 17:06:42 UTC, Mike Wey wrote:
> On 18-08-17 02:30, Johnson Jones wrote:
>> On Friday, 18 August 2017 at 00:27:05 UTC, Johnson Jones wrote:
>>> [...]
>>
>> Obvious it is easy when you have ID's, but this is meant for
>> the original case where I'm not using ID's.
>
> A far as i can tell using id's is the only option.
>
> You can use a templated function as a delegate:
>
> ```
> void cb(int column)(string index, string text, CellRendererText
> r)
> {
> writeln(column, " - ", index, " - ", text);
> }
>
> RT1.addOnEdited(&cb!1);
> RT2.addOnEdited(&cb!2);
> RT2.addOnEdited(&cb!3);
> ```
Thanks! Hopefully that will help ease the pain and help avoid the
large switch statement ;) It's strange one can't get the
cellrenderers's from a column ;/
More information about the Digitalmars-d-learn
mailing list