Ask Your Question
3

Is there a way to set new window position?

asked 2016-09-07 08:54:56 -0500

j0h gravatar image

updated 2018-10-21 09:48:00 -0500

If I create 2 new windows, using imshow() the new windows will overlap eachother every time I load the application.

it would be nifty if I could set the initial window location with a coordinate. Should I just export the content of the windows to OpenGL, or SDL or something like that, instead?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
5

answered 2016-09-07 09:14:03 -0500

berak gravatar image

you can simply call moveWindow, like:

namedWindow("win1");
moveWindow("win1", 20,20);
edit flag offensive delete link more

Comments

I see I loose the ability to drag the window after using the move window function, but that is ok.

j0h gravatar imagej0h ( 2016-09-08 07:36:53 -0500 )edit

^^ i hope, you're not trying this in a loop ..

berak gravatar imageberak ( 2016-09-08 08:17:59 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-09-07 08:54:56 -0500

Seen: 14,859 times

Last updated: Sep 07 '16