Another thing I have observed in your combosearbox that even increasing value in dropheight property, combobox results is no complete element shown at screen. It is missing last line which closes the combobox. See image below: In case you need Polo corrected code for working, please note:
Code: Select all
/* CSBox ( Combined Search Box ) try
CombosearchBox already inherits all properties events
and methods from TextBox
Test it uncommenting the following: frmCSBTest.s1.Value := '*'
*/
#include "hmg.ch"
#include "hfcl.ch"
Function Main()
Local aMunicipios:={}
/*
aMunicipios := HB_ATOKENS( MEMOREAD( "Municipios.lst" ), CRLF )
for i := 1 to len( aMunicipios )
aMunicipios[ i ] := alltrim( aMunicipios[ i ] )
next i
ASORT( aMunicipios ) // This Array MUST be sorted
*/
AEval( hb_atokens( MEMOREAD( "Municipios.lst" ), CRLF ), { |cLine| AaDd( aMunicipios, AllTrim( cLine ) ) } )
DebugMSG(aMunicipios)
DEFINE WINDOW frmCSBTest ;
AT 0,0 ;
WIDTH 620 ;
HEIGHT 300 ;
TITLE 'CSBox ( Combined Search Box ) Test' ;
MAIN
ON KEY ESCAPE ACTION frmCSBTest.Release
define label countries
row 25
col 100
width 100
value "Countries"
end label
define combosearchbox s1
row 25
col 190
width 200
fontname "Courier"
fontitalic .t.
fontbold .t.
fontcolor {255,255,255}
backcolor {0,0,255}
items aMunicipios
on enter msginfo(frmcsbtest.s1.value)
anywheresearch .t.
dropheight 170
end combosearchbox
@ 55, 190 TEXTBOX txbMessy width 400
@ 85, 190 TEXTBOX txbMessy1
END WINDOW
frmCSBTest.Center
frmCSBTest.Activate
Return Nil
Function DebugMSG
Local i, aTemp := {}
For i := 1 to pcount()
aadd( aTemp, hb_PValue(i))
Next i
MsgBox(hb_valtoexp(aTemp), "Helpful informations")
Return Nil