Page 1 of 1

Best Practice // Extended View

Posted: Fri May 15, 2020 5:46 pm
by SquarePushed
Hi,

Would be great if you could point to some best practices re the following topic:

I want to extend the TextEdit-view with the simple functionality that I can use the arrow-keys of my keyboard to step through a given value-range, and the shift-key should increase the granularity. I use the new WYSIWYG-editor.

How should I proceed? Inherit from the CTextEdit-class? Write a new component? Is there even a way I don't see, yet?

Thanks for your help!

Re: Best Practice // Extended View

Posted: Fri May 15, 2020 7:36 pm
by SquarePushed
Or should I just create a Sub-Controller? So many options on the table :)

Re: Best Practice // Extended View

Posted: Fri May 15, 2020 11:21 pm
by SquarePushed
Does anyone have a hint how to implement the sub-controller approach? I've found the description in the sdk-manual...but this is not concrete enough for me

Re: Best Practice // Extended View

Posted: Sat May 16, 2020 10:52 am
by Arne Scheffler
I think you have to create two things. First a subclass of CTextEdit where you need to override the onKeyDown method and inform the second thing you create namely a sub-controller which can create your custom CTextEdit class and control what should happen if a key down happens.

Cheers,
Arne

Re: Best Practice // Extended View

Posted: Sun May 17, 2020 5:40 pm
by SquarePushed
Thanks Arne!

In the end, I created a separate view. :)