Frage

Is it possible to subclass or similar IUP controls to get modification in functionality on lower level so changes can apply to whole project (all instances of controls).

1)
For example, in my locale we don't have decimal point but decimal coma sign on numeric keyboard. It would be ideally that IUP spin accepts coma and point for decimal point. Can that be done and how?

2)
How to get parallel navigation with keyboard (Up/Down) on IUP dialogs like we have tab/shift+tab.

3)
How to get value on input controls to be selected when get focus?

4)
How to recognize mouse doubleclick on IUP matrix cell?

Sorry for mixed questions but I need those answers now.
Thanks.

War es hilfreich?

Lösung

Yes, it is possible to subclass. But it is is very low level and requires to download IUP source code. The documentation already includes information about the internal SDK. It is easier to simply create a function, for example myIupLabel() that creates a IupLabel and sets some pre-defined attributes that will be used by the application.

1) As far as I know there is no control of the decimal point in IUP spin. You have to detail more what you are using. If it is the IupSpin control, if it is a IupText control with a SPIN attribute, and if you are using the MASK attribute of a IupText. And Yes, it is possible so solve that problem, but how depends on these details.

2) This is already done for toggles and buttons.

3) You mean IupText controls? Use the GETFOCUS_CB callback and set the SELECTION attribute inside the callback.

4) The double click is used for editing. The EDITION_CB is called when a double click occur. But there is another way. You can set the BUTTON_CB callback since the IupMatrix inhertis from IupCanvas, but you will have to save the previous one and call it from inside yours.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top