Listbox strange problem

Listbox strange problem

Postby cdmmaui » Wed May 23, 2018 7:21 pm

Hello,

I have a very strange problem which I have never had before and it is isolated to a single PRG. I have even simplified the code and still getting same result of BLANK area where LISTBOX should be displaying data. Any thoughts?

// PROGRAM: bkg.prg
//-----------------------------------------------------------------------------
#include "fivewin.ch"

REQUEST DBFCDX
REQUEST DBFFPT
REQUEST ADS, ADSKeyno, ADSKeycount, ADSGETRELKEYPOS, ADSSETRELKEYPOS

static aSecurity[06]

function Main( cComp, cUid )

local oWnd , ;
oFont, oFont2, oFont3, oMenu , ;
oLbx , ;
nSysW := GetSysMetrics(0) , ;
nSysH := GetSysMetrics(1) , ;
nLbxW := 600 , ;
nLbxH := 430 , ;
cSay := "Search for Booking by" , ;
oIcon , ;
cSearch := "" , ;
cSearchK := SPACE(40) , ;
aSearch := {} , ;
aGet[03] , ;
cLb1 := 'File'

// Client...
_Client( cComp )

// Application call...
IF PCOUNT()<2
MsgAlert( "Application Call not valid", PA[04] )
RETURN nil
ENDIF

// Index...
IF ! NdxChk()
QUIT
ENDIF

// Init...
cLb1 := IF( "APEXASIA" $ Pmod, 'Lot No.', 'File' )

// Init...
_UserSec( cUid, "BKG", aSecurity, @PA[45] )

// Init...
_VideoSet( @nLbxW, @nLbxH, @nSysW, @nSysH )

AADD( aSearch, "A. Booking Number" )
AADD( aSearch, "B. Shipper" )
AADD( aSearch, "C. Shipper Reference")
AADD( aSearch, "D. Consignee" )
AADD( aSearch, "E. Place of Receipt" )
AADD( aSearch, "F. Port of Loading" )
AADD( aSearch, "G. Port of Discharge")
AADD( aSearch, "H. Place of Delivery")
AADD( aSearch, "I. Carrier" )
AADD( aSearch, "J. Vessel" )
AADD( aSearch, "K. Commodity" )
AADD( aSearch, "L. Carrier Booking" )
AADD( aSearch, "M. File No." )

// Init...
cSearch := aSearch[01]

// Open...
_db( PA[03], "bkgdim" )
_db( PA[03], "bkgrate" )
_db( PA[03], "bkghaz" )
_db( PA[03], "booking" )

// Icon...
DEFINE ICON oIcon RESOURCE "BKG"

DEFINE FONT oFont NAME GetSysFont() SIZE 0,-12
DEFINE FONT oFont2 NAME GetSysFont() SIZE 0,-14 BOLD
DEFINE FONT oFont3 NAME GetSysFont() SIZE 0,-20 BOLD

MENU oMenu 2007
MENUITEM "E&xit" ACTION oWnd:End()
ENDMENU

DEFINE WINDOW oWnd FROM 0, 0 TO nSysH, nSysW PIXEL ;
MENU oMenu TITLE PA[04] + " - ID: " + PA[10] + " - " + ALLTRIM( PA[11] ) + ' (' + PA[23] + ')' ICON oIcon

DEFINE BUTTONBAR oBar SIZE 125,75 OF oWnd 2013

DEFINE BUTTON FILENAME "ADD.BMP" OF oBar ACTION ( EditBkg( .T. ), _Lbx(oLbx,.F.) ) WHEN aSecurity[01] ;
ADJUST TOOLTIP "New Booking"

DEFINE BUTTON FILENAME "EXIT.BMP" OF oBar ACTION ( oWnd:End(), DbCloseAll() ) ;
ADJUST TOOLTIP "Exit Booking"

SET MESSAGE OF oWnd TO PA[04] + " - " + PA[05] DATE TIME KEYBOARD 2007

// Init...
@085,005 SAY aGet[01] VAR cSay SIZE 275,25 OF oWnd FONT oFont3 PIXEL COLOR METRO_AMBER, CLR_WHITE
@085,300 COMBOBOX aGet[02] VAR cSearch ITEMS aSearch SIZE 200,250 OF oWnd FONT oFont2 PIXEL COLOR CLR_WHITE, METRO_AMBER
@085,525 GET aGet[03] VAR cSearchK SIZE 250,25 OF oWnd FONT oFont2 PIXEL PICTURE "@!" ;
VALID ( SeekBkg( cSearch, cSearchK, @oLbx ), .T. )

// Select...
SELECT booking
SET ORDER TO TAG SH
GO TOP

// Listbox...
@120,000 XBROWSE oLbx FIELDS booking->bookno ;
HEADERS "Booking No." ;
FIELDSIZES 200 ;
FONT oFont2 ;
OF oWnd SIZE nLbxW, nLbxH

ACTIVATE WINDOW oWnd MAXIMIZED
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Listbox strange problem

Postby cdmmaui » Wed May 23, 2018 7:22 pm

Sorry, I have since changed XBROWSE to LISTBOX
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Listbox strange problem

Postby cdmmaui » Wed May 23, 2018 7:38 pm

Sorry Everyone, cancel request. Programmer error !!!!
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 58 guests