How to center dlangui on screen

Edgar Huckert edgar.huckert at huckert.com
Wed Nov 28 17:23:21 UTC 2018


On Wednesday, 28 November 2018 at 08:55:11 UTC, greatsam4sure 
wrote:
> I am learning Dlang and Dlangui.
>
> I encounter, a little problem on:
>
>  how to center dlangui window on screen.
>
> How to set the window width and height outside the constructor
>
> How to maximize and minimize the window using code.
>
> How to set global font for the application.  The font display 
> is not too nice.
>
> I have check online, the documentation  and available tutorial 
> to no help
>
> Thanks in advance

For a little bit of information look at: 
https://github.com/buggins/dlangui/pull/372

Without going into depth I have tested this under Linux/GTK with 
dlangui:

     WindowState state;
     Rect    rect;
     rect.left   = 800;
     rect.top    = 10;
     rect.bottom = 600;
     rect.right  = 1000;
     bool bRet= window.setWindowState(state,
                                      false,
                                      rect);

     window.show();

This changed the position and size of my initial window.

Edgar Huckert



More information about the Digitalmars-d-learn mailing list