Function to maximize a TCanvas window?

Hello,

Could you please let me know if there is a function I could call to maximize a TCanvas window?

I do not seem to be able to find how to do it programmatically.

Thank you very much,
Siarhei.

You can use the function SetWindowSize of TCanvas with the screen dimension.

Thank you for your reply! :slight_smile:

Usually, some part of the screen area is taken by the menu bar, the task bar, plus I work on 3 different screens in a virtual machine or in a NX session (which means I also have to take into account the menu bar size and the dock size of the main operating system), which makes is very difficult to predict exactly what window size I should set.

Could you please let me know if there is a way in ROOT to figure out automatically the size of the active screen area of a given window manager (i.e. the size of a maximized window)?

Thank you very much,
Siarhei.

I have never seen any window manager doing that. Usually “maximize” means “full screen”… I guess…
I am not aware of a such function in ROOT.

Hi,
att a little program which finds out the size of your screen,
this works also with e.g. X2Go.

g++ -g standalone.cxx `root-config --glibs` ./a.out
Cheers
Otto
standalone.cxx (1.15 KB)