MDIchild window Focus diferent behavior as FW16

Postby Antonio Linares » Mon Nov 05, 2007 12:02 pm

Antonio,

There is a different behavior from Win16 to Win32 when using embeded dialogboxes into mdichild windows. This is a workaround that seems ok for samples\TestMdi4.prg:
Code: Select all  Expand view
   for n = 1 to Len( oDlg:aControls )
      oDlg:aControls[ n ]:bLClicked = GenBlock( oWndChild, oDlg:aControls[ n ] )
   next    
      
   ACTIVATE DIALOG oDlg NOWAIT ;
   ...

function GenBlock( oWndChild, oControl )

return { || oWndChild:SetFocus(), oControl:SetFocus() }

You also need to make this change in Class TGet:
Code: Select all  Expand view
METHOD LButtonDown( nRow, nCol, nFlags ) CLASS TGet
...
      if ::bLClicked != nil  // new
         Eval( ::bLClicked ) // new
      endif   // new
      return 1

Anyhow, in recent FWH builds we do recommend a better way to place controls in mdichild windows. Please review samples\TestMdiR.prg. That sample has been improved in FWH 7.11
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby AHF » Mon Nov 05, 2007 3:43 pm

Antoino,

Thanks the button solution seems to work.
On the gets this problem doesn't exist. If you click the get it doesn't happen anything. Also it doesn't focus the mdichild. But at least this beahviour it's ok. Th user must tehn click anywere on the window to get focus of it.

Antonio
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests

cron