cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

whether palette dialog can add other item types dynamically?

Hi.
I create a palette dialog class.
And I want to add some items dynamically. eg. button.

Are there some methods?
Thanks.
1 Solution

Accepted Solutions
Akos Somorjai
Graphisoft
Graphisoft
Hi,

Please find below some sample code (it uses a Dialog, not a Palette).

Best, Akos

Go to post

7 Replies 7
Akos Somorjai
Graphisoft
Graphisoft
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
Anonymous
Not applicable
Akos wrote:
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
Thanks.
Besides, I want to add a tabpage.TabPage constructor need TabControl. How can add it?
Thanks.
Anonymous
Not applicable
Hi.
Besides, I want to add a tabpage in the palette dialog.
TabPage constructor need TabControl.

How can add it?
Thanks.
Akos Somorjai
Graphisoft
Graphisoft
Hi,

Please find below some sample code (it uses a Dialog, not a Palette).

Best, Akos
Anonymous
Not applicable
Akos wrote:
Hi,

Please find below some sample code (it uses a Dialog, not a Palette).

Best, Akos
Thanks.
I can't find 'GS::Owner' and 'GS::NewOwned' in your code.
Whether I need to import other header files?
Akos Somorjai
Graphisoft
Graphisoft
Hi,

Please include "Owner.hpp"; it is in the GSRoot module.

Best, Akos
Anonymous
Not applicable
Akos wrote:
Hi,

Please include "Owner.hpp"; it is in the GSRoot module.

Best, Akos
Thank you very much.
Now I can add 'TabPage' dynamically.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!