[3.14] Retrieve current Panel (Window) Size

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
5 posts • Page 1 of 1
moto3101
Posts:37
Joined: Tue Aug 22, 2017 2:04 pm

[3.14] Retrieve current Panel (Window) Size

Post by moto3101 »

Hello together,

I do have a problem with the method panelSize():

Code: Select all

int panelSize (string PanelName, int &width, int &height, bool currentSize = false);
If you have a panel which has no layout, and you drag the panel to increase the size, panelsize() will always return the same value (I do understand the panel will not change its size, if there is no layout defined and you change the window size).

However, is there a way to obtain the 'window size' during runtime for an opened not-layouted panel?

Thanks in advance!

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: [3.14] Retrieve current Panel (Window) Size

Post by leoknipp »

Are you opening the panel as a child panel or in an own module?
What is the information of the size used for?

Best Regards
Leopold Knipp
Senior Support Specialist

gschijndel
Posts:376
Joined: Tue Jan 15, 2019 3:12 pm

Re: [3.14] Retrieve current Panel (Window) Size

Post by gschijndel »

In case the contents are scaled you could get the 'window size' by multiplying the width and height (as returned by panelSize) with the zoom factor.

moto3101
Posts:37
Joined: Tue Aug 22, 2017 2:04 pm

Re: [3.14] Retrieve current Panel (Window) Size

Post by moto3101 »

Hi Leopold,
sorry for my belated reply. I opened it with ChildPanelOnModule.

@gschijndel: What method do you use to obtain the window size?

Best regards,
Morten

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: [3.14] Retrieve current Panel (Window) Size

Post by leoknipp »

Are you sure that you are using a panel without a layout and open it as a child panel?
A panel which has no layout cannot be resized if it is opened as child panel.

Best Regards
Leopold Knipp
Senior Support Specialist

5 posts • Page 1 of 1