whether palette dialog can add other item types dynamically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-02 10:54 AM - last edited on 2022-09-29 09:54 AM by Daniel Kassai
I create a palette dialog class.
And I want to add some items dynamically. eg. button.
Are there some methods?
Thanks.
Solved! Go to Solution.
- Labels:
-
Add-On (C++)
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-03 02:31 PM
Please find below some sample code (it uses a Dialog, not a Palette).
Best, Akos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-02 12:52 PM
DG::Button has such a constructor is you do not want to load it from a resource file (see DGButton.hpp):
Button (const Panel& panel, const Rect& rect, ButtonType type = Normal, FrameType frameType = Frame);
Pass the palette as the first param, and the desired rect in the second.
Best, Akos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-03 01:55 AM
Akos wrote:Thanks.
Hi,
DG::Button has such a constructor is you do not want to load it from a resource file (see DGButton.hpp):
Button (const Panel& panel, const Rect& rect, ButtonType type = Normal, FrameType frameType = Frame);
Pass the palette as the first param, and the desired rect in the second.
Best, Akos
Besides, I want to add a tabpage.TabPage constructor need TabControl. How can add it?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-03 10:40 AM
Besides, I want to add a tabpage in the palette dialog.
TabPage constructor need TabControl.
How can add it?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-03 02:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-04 02:33 AM
Akos wrote:Thanks.
Hi,
Please find below some sample code (it uses a Dialog, not a Palette).
Best, Akos
I can't find 'GS::Owner' and 'GS::NewOwned' in your code.
Whether I need to import other header files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-04 08:40 AM
Please include "Owner.hpp"; it is in the GSRoot module.
Best, Akos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-12-05 12:41 PM
Akos wrote:Thank you very much.
Hi,
Please include "Owner.hpp"; it is in the GSRoot module.
Best, Akos
Now I can add 'TabPage' dynamically.