Xbrowse FW 9.04

Xbrowse FW 9.04

Postby arpipeline » Wed Apr 21, 2010 1:21 am

Hello,

I am using FW 9.04 and am having a very basic issue with xBrowse. I cannot get mouse clicks to move the selector nor can I scroll using the scroll bar and thumb. Only the mouse wheel seems to work. Here is the code:

Code: Select all  Expand view
#include "fivewin.ch"
#include "xbrowse.ch"

STATIC oWnd

//------------------------------------------------------------------------//

FUNCTION Main()

   LOCAL oIcon, oBar

   SET _3DLOOK ON

   DEFINE ICON oIcon ;
       RESOURCE 1

   USE CUSTOMER ALIAS CUSTOMER SHARED

   DEFINE WINDOW oWnd;
       TITLE "Auto Credit Analysis by Subprime Tools";
       MDI ;
       MENU BuildMenu();
       COLOR "N/W" ;
       ICON oIcon

   DEFINE BUTTONBAR oBar;
       OF oWnd ;
       SIZE 60, 80 ;
       2007  // Style

   DEFINE BUTTON ;
       OF oBar ;
       ACTION MsgInfo( "Click" ) ;
       RESOURCE "BMP_NEWCUSTOMER" ;
       PROMPT "New Customer"

   DEFINE BUTTON ;
       OF oBar ;
       ACTION MsgInfo( "Click" ) ;
       RESOURCE "BMP_EDITCUSTOMER" ;
       PROMPT "Edit Customer"

   DEFINE BUTTON ;
       OF oBar ;
       ACTION MsgInfo( "Click" ) ;
       RESOURCE "BMP_FINDCUSTOMER" ;
       PROMPT "Find Customer"

   DEFINE BUTTON ;
       OF oBar ;
       ACTION MsgInfo( "Click" ) ;
       RESOURCE "BMP_DELETECUSTOMER" ;
       PROMPT "Delete Customer"

   DEFINE BUTTON ;
       OF oBar ;
       ACTION MsgInfo( "Click" ) ;
       RESOURCE "BMP_PRINT" ;
       PROMPT "Print Analysis" ;
       GROUP

   DEFINE BUTTON ;
       OF oBar ;
       ACTION MsgInfo( "Click" ) ;
       RESOURCE "BMP_PRINTPREVIEW" ;
       PROMPT "Preview Analysis"

   DEFINE BUTTON ;
       OF oBar ;
       ACTION MsgInfo( "Click" ) ;
       RESOURCE "BMP_REBUILDDATABASE" ;
       PROMPT "Rebuild Database" ;
       GROUP

   SET MESSAGE ;
       OF oWnd ;
       TO "Copyright © 2010, Subprime Tools." ;
       CENTERED

   ACTIVATE WINDOW oWnd ;
       ON INIT BrowseCustomers()

RETURN NIL

//------------------------------------------------------------------------//

FUNCTION BuildMenu()

   LOCAL oMenu

   MENU oMenu
      MENUITEM "&File"
        MENU
           MENUITEM "&New" ;
               ACTION MsgInfo( "Hello" ) ;
               MESSAGE "Clients management"

           MENUITEM "&Edit" ;
               ACTION MsgInfo( "Hello" )

           MENUITEM "F&ind..." ;
               ACTION MsgInfo( "Hello" )

           MENUITEM "&Delete..." ;
               ACTION MsgInfo( "Hello" )

           SEPARATOR

           MENUITEM "&Print..." ;
               ACTION MsgInfo( "Hello" )

           MENUITEM "Pre&view" ;
               ACTION MsgInfo( "Hello" )

           MENUITEM "Printer &Setup" ;
               ACTION MsgInfo( "Hello" )

           SEPARATOR

           MENUITEM "&End" ;
               ACTION oWnd:End()
        ENDMENU
      MENUITEM "&Tools"
      MENUITEM "&Help"
   ENDMENU

RETURN oMenu

//------------------------------------------------------------------------//

FUNCTION BrowseCustomers()

  LOCAL oBrw

  @ 0,0 XBROWSE oBrw ;
     COLUMNS "First", "Last", "Street", "City", "State", "Zip" ;
     OF oWnd ;
     ALIAS 'CUSTOMER' ;
     LINES CELL

  oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
  oBrw:CreateFromCode()
  oWnd:oClient := oBrw
  oBrw:SetFocus()

RETURN NIL
User avatar
arpipeline
 
Posts: 36
Joined: Thu Oct 26, 2006 5:23 pm
Location: United States

Re: Xbrowse FW 9.04

Postby arpipeline » Wed Apr 21, 2010 1:40 am

Hi all,

I found the problem - I had the MDI option indicated in the main WINDOW definition. Once I took that out, all is fine.

Thanks,

Andy
User avatar
arpipeline
 
Posts: 36
Joined: Thu Oct 26, 2006 5:23 pm
Location: United States


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 108 guests