Page 1 of 1

Error Tabs

Posted: Sun Oct 19, 2008 7:38 pm
by Dorneles
What is wrong with this tab, use left when it becomes distorted.

ImageImage

Code: Select all | Expand

*****--- Windows MDICHILD ---***************************************************
  DEFINE WINDOW oWndChild MDICHILD TITLE "Contas a Receber"

*****--- DIALOG PRINCIPAL ---***************************************************   
    DEFINE DIALOG oDlg RESOURCE 1004 OF oWndChild 
    oDlg:oFont:=ArialBR1
   
*****--- PAGES / TABS - DIALOG 1004 PRINCIPAL ---*******************************   
      REDEFINE PAGES oPag ID 102 OF oDlg ;           
               DIALOGS 1005, 1005
            
      REDEFINE TABS oTabs ID 104 OF oDlg ;
             PROMPT "&Abertas", "&Recebidas" ;   
             ACTION {oPag:setoption(oTabs:nOption)}                 
             oDlg:oLeft = oTabs

*****--- DIALOG 1005 Opcao 1 do oTabs (Em Abertas) ---**************************
      REDEFINE PAGES oPag1 ID 102 OF oPag:aDialogs[ 1 ] ;           
               DIALOGS 1007,1010, 1011

               
      REDEFINE TABS oTabs1 ID 101 OF oPag:aDialogs[ 1 ] ;
               PROMPTS "Nome do Cliente", "Número do Titulo", "Data de Emissão/Vcto" ;
               ACTION {oPag1:setoption(oTabs1:nOption)}
               oPag:aDialogs[ 1 ]:oTop = oTabs1

Posted: Sun Oct 19, 2008 9:49 pm
by Dorneles
I made it up to solve the problem, but now the tabs does not meet until the end of dialog.

ImageImage

Posted: Sun Oct 19, 2008 11:29 pm
by Antonio Linares
Dorneles,

> I made it up to solve the problem

What have you changed in your code ?

samples\TestTabs.prg works fine on all sides.

Posted: Sun Oct 19, 2008 11:52 pm
by Dorneles
Antonio, where the "DEFINE WINDOW oWndChild MDICHILD" is created, the tabs, get the value: nHeight, but when the windows are maximized "ACTIVATE WINDOW oWndChild maximized" to not resize the tabs: nHeight.

ImageImage

Code: Select all | Expand

METHOD Paint() CLASS TTabs


      case ::nOrientation == OR_LEFT
         hOldBmp = SelectObject( hDCMem, hBmpBackV )
         StretchBlt( ::hDC, ::nWidth -1, 0, -::nWidth, ::nHeight, hDCMem, 0, 0, nBmpWidth(

hBmpBackV ), nBmpHeight( hBmpBackV ), SRCCOPY )