The widget is smaller than the screen size

15 views
Skip to first unread message

Alex Tuchin

unread,
Apr 7, 2024, 10:45:32 AMApr 7
to dislin-users
Hello!
Why  with this code:
  int screen_width, screen_height;
  g.getscr (&screen_width, &screen_height);
  g.swgwin (0, 0, screen_width, screen_height);
  g.swgtit ("Dislin study");
  int id_main = g.wgini ("form");
is the widget size smaller than the screen size with this code? 
You have to expand the widget by clicking on the rectangle in the upper right corner so that the widget size becomes equal to the screen size.
I attached a screenshot
ScreenSize.png

Helmut Michels

unread,
Apr 11, 2024, 3:24:25 AMApr 11
to dislin-users
Hi Alex,

thank you for the hint. It looks like a bug.  I will make some tests.
By the way, the option swgopt ("full", "main") can replace the
getscr/swgwin construct. It's already in the library, but not documented.
This should answer an older question from you.

With best regards,

Helmut

Alex Tuchin

unread,
Apr 11, 2024, 6:11:11 AMApr 11
to dislin-users
Hi, Helmut,
Unfortunately, when using this function:
g.swgtit ("Dislin study");
g.swgopt("full", "main");
int id_main = g.wgini ("form"); // hori, vert -  result is the same
NoFull.jpgFull.jpgthe result is the same as when using screen sizes. I attached screenshots of the screen when calling this function and after clicking on the rectangle in the upper right corner.

четверг, 11 апреля 2024 г. в 10:24:25 UTC+3, mic...@dislin-software.de:

Helmut Michels

unread,
Apr 11, 2024, 7:04:02 AMApr 11
to dislin-users
Dear Alex,

yes, the option is just a shortcut for the both routines getscr and swgwin, not a correction.
I have now learned that  an invisible border of 7 pixels is plotted at the left and right side 
of a window since Windows 10, and therefore, the width of the window is reduced by Windows.
So, a workaround would be to move the window by 7 pixels to the left and increase it's width in swgwin.

With best regards,

Helmut

Alex Tuchin

unread,
Apr 13, 2024, 11:10:56 AMApr 13
to dislin-users
Hi,Helmut

With the code:
g.swgwin (-7, 0, screen_width + 14, screen_height);
the left and right stripes are no longer visible, however, when you click the rectangle in the upper right corner, the widget jumps up (I posted the video). Thus, it is not possible to achieve a complete full-screen rotation of the window. It's not a problem, but I want to let you know about it.

With best regards, Alex

четверг, 11 апреля 2024 г. в 14:04:02 UTC+3, mic...@dislin-software.de:
Screen.mp4
Reply all
Reply to author
Forward
0 new messages