Custom controls #140
-
Hi, good morning! I'm new in the discussion sections, so, please, bear with me if the questions has been asked before. I trieed to look for sth similar but I didn't find anything. So, my question is if there is any possibility to create custom controls and if so, how can I do it? Is there any section in the documentation (or maybe some example) about how to do it? By custom controls I mean controls with custom behaviour (for example, a button which expands a panel when is pressed over it) instead of custom look and feel. Thank you so much in advance! I've been testing the SDK and I think is vereything I need in my life :D |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @gbernaldo82! Thank you for use NAppGUI-SDK. For create custom controls you have to use View component, that allows you to draw anything and get the mouse/keyboard events. You have several examples: You can also use the undocumented API On the other hand, if what you are looking for are controls that change the morphology of the interface, take a look at these demos. Flyout Windows Dynamic Layouts Panel Multilayout Button Show/Hide Panel If this doesn't solve your problem, open an issue indicating what exactly you need to see the best way to implement it. |
Beta Was this translation helpful? Give feedback.
Hi @gbernaldo82! Thank you for use NAppGUI-SDK.
For create custom controls you have to use View component, that allows you to draw anything and get the mouse/keyboard events. You have several examples:
https://nappgui.com/en/howto/col2dhello.html
https://nappgui.com/en/demo/die.html
https://nappgui.com/en/demo/bode.html
You can also use the undocumented API
drawctrl.h
that allows you draw some items with the native look. e.g Headers and Checkboxes. Take a look to ListBox and TableView. In NAppGUI these components are "custom controls" instead a wrapper over native components.On the other hand, if what you are looking for are controls that change the morphology of the interface, take a lo…