Hello,
I changed my programm code from clipper to xbase++ 1.90. I have change all my code to run the programms in a VIO Modus with CRT screens. They work all fine. Now I start to change some parts to the GUI Modus. I open a Window with xbpbrowse as decirbed in the help file. It works fine, but I can´t leave the window.
What have I to do to leave the windwos and the browse modus to go on my VIO screen programm? The example says nothing about that.
Is there somewhere a smal and easy to understand complete programm, where I can learn the object oriented programm style? I can see all the examples, but don´ t know how to assemble all of this.
Thanks
Wolfgang
xbpbrowse() example:
 
#include "Appevent.ch"
#include "Common.ch"
#pragma Library( "XppUi2.lib" )
   PROCEDURE AppSys
   // Desktop bleibt Anwendungsfenster
   RETURN
 
   PROCEDURE Main
      LOCAL nEvent, mp1, mp2, oXbp, oBrowse, cField, i
      USE Customer NEW
      // Dialogfenster versteckt erzeugen
      oXbp := GuiStdDialog( "Standard GUI Browser for DBF" )
      // Browser im Fenster erzeugen
      oBrowse := GuiBrowseDb( oXbp:drawingArea )
      // Spalten für alle Felder anfügen
      FOR i:=1 TO FCount()
         cField := FieldName( i )
         oBrowse:addColumn( FieldBlock(cField), , cField )
      NEXT
     // Der Browser füllt nach :resize() immer das Fenster aus
      oXbp:drawingArea:resize := {|mp1,mp2,obj| obj:childList()[1]:setSize(mp2) }
      oXbp:show()
      oBrowse:show()
      SetAppFocus( oBrowse )
      DO WHILE nEvent <> xbeP_Close
         nEvent := AppEvent( @mp1, @mp2, @oXbp )
         oXbp:handleEvent( nEvent, mp1, mp2 )
      ENDDO
   RETURN
 
   ******************************************************************
   * GUI Browser mit Navigations-Codeblöcken für DBF erzeugen
   ******************************************************************
   FUNCTION GuiBrowseDB( oParent, aPos, aSize )
      LOCAL oBrowse
      oBrowse := XbpBrowse():new( oParent,, aPos, aSize ):create()
      // Navigationscodeblöcke für den Browser   
      oBrowse:skipBlock     := {|n| DbSkipper(n) }
      oBrowse:goTopBlock    := {| | DbGoTop()    }
      oBrowse:goBottomBlock := {| | DbGoBottom() }
      oBrowse:phyPosBlock   := {| | Recno()      }
      // Navigationscodeblöcke für den vertikalen Scrollbar
      oBrowse:posBlock      := {| | DbPosition()    }
      oBrowse:goPosBlock    := {|n| DbGoPosition(n) }
      oBrowse:lastPosBlock  := {| | 100             }
      oBrowse:firstPosBlock := {| | 0               }
   RETURN oBrowse
   ******************************************************************
   * Standard Dialogfenster versteckt erzeugen
   ******************************************************************
   FUNCTION GuiStdDialog( cTitle )
      LOCAL oDlg
      DEFAULT cTitle TO "Standard Dialog Window"
      oDlg          := XbpDialog():new( ,,{10,10}, {600,400},, .F. )
      oDlg:icon     := 1
      oDlg:taskList := .T.
      oDlg:title    := cTitle
      oDlg:create()
      oDlg:drawingArea:setFontCompoundName( "8.Helv" )
   RETURN oDlg