Page 1 of 1

Tget lostofocus error on combobox

Posted: Fri Oct 30, 2020 7:53 am
by Silvio.Falconi
Image

got this error by selecting a combo


the source

Code: Select all

#include "fivewin.ch"
#include "constant.ch"


Function Test()
       local oDlg,oBar,oFont,oBold
       local nBottom   := 24
       local nRight    := 102
       local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
       local nHeight := nBottom * DLG_CHARPIX_H
       local aGet[17]

       local nTipoElemento:= 1
       local nTipoData:= 2
       local aElemento :={"Testo","Immagine","Barcode"}
       local cDescrizione:=space(40)
       local aTipoData :={"Campo","Valore"}


   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14

   DEFINE DIALOG oDlg        ;
   TITLE "Riga modulo"     ;
   SIZE nWidth, nHeight   PIXEL  FONT oFont    ;
   STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION,  4 ) ;
   COLOR CLR_BLACK,  nRgb( 245,244,234)

       @ 8, 5 Say "Tipo Elemento "  SIZE 80,14 PIXEL OF oDlg  TRANSPARENT
       @ 8, 75 COMBOBOX aGet[1] VAR nTipoElemento  ITEMS aElemento  SIZE 50,90 PIXEL OF oDlg    STYLE CBS_DROPDOWN


       @ 24, 5 Say "Dato da Stampare"  SIZE 90,20 PIXEL OF oDlg TRANSPARENT
       @ 22, 75  COMBOBOX aGet[2] VAR nTipoData  ITEMS aTipoData SIZE 50,90 PIXEL OF oDlg   STYLE CBS_DROPDOWN
     
 ACTIVATE DIALOG oDlg CENTERED ;
       ON INIT ( nTipoData:=2


it run only rem STYLE CBS_DROPDOWN why ???????

Re: Tget lostofocus error on combobox

Posted: Sat Oct 31, 2020 8:10 am
by Silvio.Falconi
any solution please ?

Re: Tget lostofocus error on combobox

Posted: Sat Oct 31, 2020 3:35 pm
by nageswaragunupudi
You should not use CBS_DROPDOWN style when the variable is numeric.
This style can be used when the variable is of character type.

Re: Tget lostofocus error on combobox

Posted: Sat Oct 31, 2020 5:32 pm
by Silvio.Falconi
Nages,
Make the same errore when i put the cursor of the mouse into get of the combobox control

Re: Tget lostofocus error on combobox

Posted: Sun Nov 01, 2020 10:24 am
by Silvio.Falconi
nageswaragunupudi wrote:You should not use CBS_DROPDOWN style when the variable is numeric.
This style can be used when the variable is of character type.
yes of course.....