Window Size error

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
User avatar
AlessandroV
Posts: 65
Joined: Tue Oct 31, 2017 9:07 am
Location: Italy

Window Size error

Post by AlessandroV »

Hi to all,

like atthached example, in case i use a dialog/window swithing window, it not open, as VO, at a correct Size.
Is more simple to see the example to explain the problem. Basically the 3 window is opended in wrong size.

Any workaround for to fix up ? Also i have not found with debugger original Win Size for to manage it in Show Method (or Expose).

Thanks in advance.
Alessandro
User avatar
AlessandroV
Posts: 65
Joined: Tue Oct 31, 2017 9:07 am
Location: Italy

Window Size error

Post by AlessandroV »

Hi to all. I found a workaround, I'm posting it because it could happen to others.
In Surface object i found original Dimension and so i can resize my window in the Constructor.
But is it a small bug, maybe you can fix up.

Bye Alessando

CONSTRUCTOR(oWindow,iCtlID,oServer,uExtra) 
    LOCAL w,h AS INT
    LOCAL oD AS Dimension
    LOCAL oSu        AS __formdialogwindow

    IF SysObject():SettoModale

        SUPER(oWindow,iCtlID,oServer,0l)
        
        oD := SELF:oSurface:Size
        w := od:Width
        h := od:Height

        SELF:Size := Dimension{w,h}    
    ELSE
        SUPER(oWindow,iCtlID,oServer,uExtra)
    ENDIF

    SysObject():SettoModale := FALSE  // ripristino sempre DATAWINDOW

RETURN SELF
 
Post Reply