class XEditLine : EditLine
{
this(string ID, dstring initialContent = null)
{
super(ID, initialContent);
}
override bool onKeyEvent(KeyEvent e)
{
super.onKeyEvent(e);
x = to!double(this.text);
return true;
}
}
This works but it seems like there should be a cleaner way to do
this, any suggestions? Thanks.
I have a variable, x, which I want to update when the content of
a DlangUI EditLine is modified. I tried making this work with the
"onContentChange" method listed in the API documentation, but dmd
told me it's not there. I've got this working now by implementing
a custom subclass of EditLine as below:
- DlangUI EditLine question Kyle via Digitalmars-d-learn
- Re: DlangUI EditLine question Vadim Lopatin via Digitalmars-d-learn
- Re: DlangUI EditLine questi... Kyle via Digitalmars-d-learn
