Tget lostofocus error on combobox

Tget lostofocus error on combobox

Postby Silvio.Falconi » Fri Oct 30, 2020 7:53 am

Image

got this error by selecting a combo


the source
Code: Select all  Expand view

#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 ???????
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: Tget lostofocus error on combobox

Postby Silvio.Falconi » Sat Oct 31, 2020 8:10 am

any solution please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: Tget lostofocus error on combobox

Postby nageswaragunupudi » Sat Oct 31, 2020 3:35 pm

You should not use CBS_DROPDOWN style when the variable is numeric.
This style can be used when the variable is of character type.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Tget lostofocus error on combobox

Postby Silvio.Falconi » Sat Oct 31, 2020 5:32 pm

Nages,
Make the same errore when i put the cursor of the mouse into get of the combobox control
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: Tget lostofocus error on combobox

Postby Silvio.Falconi » Sun Nov 01, 2020 10:24 am

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.....
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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