FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Antonio ALSO FOR EXPLORERBAR
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
To Antonio ALSO FOR EXPLORERBAR
Posted: Thu Jul 08, 2010 09:59 AM
Dear Antonio,
Dear Daniel,

We have also the same error on Explorerbar when we use it on a dialog ( .nor. 4 style) into a normal MainWindow


when we create many panels and we have at left a xbrowse,


the object oExbar should create a vertical


but on the same object near to panels to scroll each panels and not show the vertical bar into main Window


because there we have the vertical scrollbar of xbrowse


As you can see on this small test sample :


Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "xbrowse.ch"
#include "Splitter.ch"

REQUEST DBFCDX
REQUEST DBFFPT

STATIC   oWndMain,oBar



Function Main()
   Local  aMenuRibbon := { "MENU1","MENU2","MENU3" }
   Local obar

   RddSetDefault( "DBFCDX" )

   DEFINE WINDOW oWndMain

   obar:=TRibbonBar():New(oWndMain, aMenuRibbon,,,,160,60 )

     SET MESSAGE OF oWndMain TO "Testing the Explorerbar in a Dialog"   2007

   oWndMain:bResized := {|| ResizeWndMain() }

   ACTIVATE WINDOW oWndMain  MAXIMIZED;
   ON INIT Customer(oBar)
   RETU NIL



   FUNCTION CUSTOMER(oBar)
    Local  oBrw
    Local  oExbar
    Local  oDlg
    Local  oWnd    := oWndMain
    local  aClient := GetClientRect (oWnd:hWnd )
    Local nSplit   :=112
    Local nOrder:= 1
    Local nrecno:= 1
    Local  oSplit

   USE CUSTOMER ALIAS CU  INDEX CUSTOMER

   SELECT CU

   DEFINE DIALOG oDlg

   //set the dialog
   oDlg:nTop    = oBar:nHeight-1
   oDlg:nLeft   = 0
   oDlg:nBottom = aClient[3] - 1
   oDlg:nRight  = aClient[4]
   oDlg:nStyle  = nOR( WS_CHILD, 4 )



    // create Explorerbar
    oExBar = TExplorerBar():New(0, 0, nSplit, (oDlg:nBottom / 2)-24, oDlg,.t. )




    //set the xbrowse
   oGrid := TXBrowse():New( oDlg )
   oGrid:nTop    := 00
   oGrid:nLeft   := nSplit+2
   oGrid:nBottom :=  (oDlg:nBottom / 2)  -90
   oGrid:nRight  :=  (oDlg:nRight / 2 )

   aBrowse   := { { { || CU->FIRST }, i18n("First"), 150, 0 },;
                  { { || CU->LAST  }, i18n("Last"), 150, 0 },;
                  { { || CU->STREET}, i18n("Street"), 150, 0 },;
                  { { || CU->CITY } , i18n("City"), 150, 0 } }


   FOR i := 1 TO Len(aBrowse)
      oCol := oGrid:AddCol()
      oCol:bStrData := aBrowse[ i, 1 ]
      oCol:cHeader  := aBrowse[ i, 2 ]
      oCol:nWidth   := aBrowse[ i, 3 ]
      oCol:nDataStrAlign := aBrowse[ i, 4 ]
      oCol:nHeadStrAlign := aBrowse[ i, 4 ]
   NEXT

   oGrid:nStretchCol = STRETCHCOL_LAST
   oGrid:SetRDD()
   oGrid:CreateFromCode()
   oGrid:nRowHeight  :=40
   oGrid:nHeaderHeight  := 36


   CU->(DbSetOrder(nOrder))
   CU->(DbGoTo(nRecno))




   // splitter



 @ 00, nSplit SPLITTER oSplit ;
      VERTICAL ;
       COLOR RGB(143,172,230) ;
      PREVIOUS CONTROLS oExBar, oBar ;
      HINDS CONTROLS oGrid ;
      SIZE 1, (oDlg:nBottom / 2)-24  PIXEL ;
      OF oDlg ;
      _3DLOOK ;
      UPDATE



   ACTIVATE DIALOG oDlg NOWAIT  ;
  ON INIT  BarExplorer(oExBar)
 RETU NIL






Function ResizeWndMain()
   local aClient
    oWndMain:oMsgBar:Refresh()
  SysRefresh()
  RETU NIL






FUNCTION BarExplorer(oExBar)

  oPanel1:= oExBar:AddPanel( "Panel 1", , 200)
  oPanel1:LSPECIAL:=.T.
  oPanel2 = oExBar:AddPanel( "Panel 2", , 200)
  oPanel3 = oExBar:AddPanel( "Panel 3", , 100)
  oPanel4 = oExBar:AddPanel( "Panel 4", , 200)
  oPanel5 = oExBar:AddPanel( "Panel 5", , 100)
  oPanel6 = oExBar:AddPanel( "Panel 6", , 200)

   RETU NIL
FWH .. BC582.. xharbour

Continue the discussion