cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

How to dock the RollDownPalette

satoshi shimokura
Contributor

hello.
Always I am indebted.


I tried making a RollDownPalette by referring to the BasicElementIconsRollDownDialog in the DG_Test sample.
I'm in trouble because I can't make it a docking palette.


When creating a general palette by inheriting the Palette class, in the constructor

 

const GS::Guid TestPaletteGuid{ "C67E8137-A2AC-42FD-BDE6-413F509731B8" };

// constructor
TestPalette::TestPalette()
    : DG::Palette(ACAPI_GetOwnResModule(), ID_TEST_PALETTE, ACAPI_GetOwnResModule(), 
                  TestPaletteGuid)

 

I know that you can make it a docking palette by specifying a Guid like this.


However, in order to create a RollDownPalette, you must inherit the RollDownPalette class instead of the Palette class,
I wrote this in the constructor, but it doesn't dock.

 

const GS::Guid TestPaletteGuid{ "C67E8137-A2AC-42FD-BDE6-413F509731B8" };

// constructor
TestPalette::TestPalette(DG::NativePoint* posistion)
    :UD::RollDownPalette(TestPaletteGuid, posistion, Close)

 

A Guid is given to the constructor of the base class, but this Guid may not be inherited to the Palette of the base class.
I also thought that there might be other constructors, so I searched for other constructors of the RollDownPalette class, but found only these constructors.

 

RollDownPalette (const GS::Guid& guid, CloseType closeType = NoClose,
                 CaptionType captionType = TopCaption, FrameType frameType = NormalFrame);
RollDownPalette (const GS::Guid& guid, const DG::NativePoint* position = nullptr, 
                 CloseType closeType = NoClose, CaptionType captionType = TopCaption, 
                 FrameType frameType = NormalFrame);

 

Since there is a RollDownPalette that is docked with the palettes provided in Archicad (for example, the toolbox docked at the left end of the screen), I think it will be possible...

 

If you know how to dock the RollDownPalette, please let me know.

 

Thank you.

2 REPLIES 2

julienK
Enthusiast

For a palette to be dockable, it has to have the noGrow  argument in the grc file:

'GDLG'  JKSRFTOOLS_JKPLT_RESID   Palette | leftCaption | noGrow | close        0    0  80  34  "JKPalette Example" {
/* [ 1] */ IconButton            5  2   30   30     JKSettings_IconId
/* [ 2] */ IconButton           40  2   30   30     JKZoneToolLarge_IconId
}

 

julien quadra

Thank you for your reply.

> For a palette to be dockable, it has to have the noGrow argument in the grc file:


However, I think that the argument to be added to the grc file is not noGrow but grow.
Another common palette that I have implemented is docking with argument grow and not docking with noGrow.

Please try it in your environment.

- - -

Also, the problem in this thread is not a general palette that inherits the DG::Palette class as you replied
A special palette that inherits from the UD::RollDownPalette class.


I made a simple sample. (attached image)
This is the undocked state, but it's working fine in our environment.


This roll-down palette has a structure like a parent with multiple tab pages as children,
Each tab page has its own resources and classes.

The parent page has a class but no resources.
(The resource in the green part of the image is just the text provided for the child palette heading)

I also wanted to specify grow as an argument if the parent resource exists
Cannot be specified because the resource itself does not exist.

I think that the child tab page is probably not related to docking
These are also tab pages, not palettes, so I don't think grc has any items related to docking.

It may be a difficult problem, but if there is someone with knowledge
I would like you to help me.


Thank you.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!