Setpos with a modal window

This forum is for eXpress++ general support.
Post Reply
Message
Author
wkedv
Posts: 12
Joined: Mon Feb 08, 2010 3:04 am

Setpos with a modal window

#1 Post by wkedv »

Hi Roger,

A nonmodal window i can adjust in the Appwindow exact on pos 0,0 from the parent,
but with a nonmodal there i dont know how to do, that i can it make like in a nonmodal window.

The conflict is, in a nonmodal i can set in DCREADGUI the option ** APWINDOW oParentDlg ** and the window will be positioned on the parent.

With modal the opened window is every time at the appdesktop.

See my attached sample.

Plse help me.

thanks and regards Kurt.
Attachments
modaltest.ZIP
(1.48 KiB) Downloaded 648 times

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Setpos with a modal window

#2 Post by rdonnay »

I think this will work for you:

Code: Select all

Function tw2( oDlgtest)

Local GetList := {}, GetOptions, oDlgtw2, oget, cget, oStatic

cget := space(15)

@ .1,.1 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX SIZE 50,5.000 OBJECT oStatic

@ 2,05 DCSAY "Test-1 " PARENT oStatic
@ 2,20 DCGET cget OBJECT oget PARENT oStatic

DCGETOPTIONS HIDE

DCREAD GUI FIT ;
		MODAL ;
      OPTIONS GetOptions ;
      SETAPPWINDOW ;
      ADDBUTTONS ;
      TITLE 'Test-modal' ;
      SETFOCUS @oget ;
      EVAL {|o,a| a := DC_CalcAbsolutePosition({0,0},oDlgTest), ;
                  o:setPos({a[1]+5,a[2]+5}), ;
                  o:show()}

RETURN nil
The eXpress train is coming - and it has more cars.

wkedv
Posts: 12
Joined: Mon Feb 08, 2010 3:04 am

Re: Setpos with a modal window

#3 Post by wkedv »

Hi Roger,

many thanks for your prompt help.

it works fine

Thanks and regards Kurt

Post Reply