TSBROWSE - COMBOBOX (resolvido) !

TSBROWSE - COMBOBOX (resolvido) !

Postby MGA » Mon Oct 13, 2008 11:45 am

Sr. Manuel, estou tentando usar combobox em uma célula que pode ou não ser um combobox, ex:


redefine browse oBrw2 id 4003 of oDlg font ofonte_por CELLED
obRW2:setArray(aDadoscli)
obRW2:nHeightCell := 33
obRW2:lMChange := .T.
obRW2:lDrawHeaders:= .F.
obRW2:lNoMoveCols := .T.
obRW2:lNoHScroll := .T.
oBrw2:nFreeze := 1
oBrw2:lLockFreeze := .T.
obRW2:refresh()

ADD COLUMN TO BROWSE obRW2 DATA ARRAY ELEMENT 1 ;
SIZE 190 ;
3DLOOK TRUE;
ALIGN DT_RIGHT PICTURE "@!"

ADD COLUMN TO BROWSE obRW2 DATA ARRAY ELEMENT 2 ;
SIZE 360 EDITABLE;
3DLOOK TRUE;
ALIGN DT_LEFT MOVE DT_MOVE_NEXT;
Preedit {|uVar| fwhiscombobox(lnewcart,obrw2,@uVar) };
Postedit {|| obRW2:refresh(.t.) }


*****************************************************
static function fwhiscombobox(lnewcart,obrw2,uVar)
*****************************************************
local lCb:=if(obrw2:nat=6,.t.,.f.)
if lCb
//COMBOBOX
obrw2:aColumns[2]:lcombobox:=.T.
obrw2:aColumns[2]:aItems :={ "TESTE A","TESTE B"}
else
obrw2:aColumns[2]:lcombobox:=.F.
obrw2:aColumns[2]:aItems :=NIL
endif
return(lnewcart)


Sr. Manuel, quando é COMBOBOX, funciona muito bem até que eu selecione um item com ENTER, então acontece o erro:

Error description : Error BASE/1072 Argument error: <>
Args:
[ 1] = N 2
[ 2] = C

Stack Calls
===========
Called from: TSBROWSE.PRG => TSBROWSE:EDITEXIT(3576)
Called from: TSBROWSE.PRG => (b)TSBROWSE:EDIT(3497)
Called from: TSCOMBO.PRG => TSCOMBO:KEYDOWN(68)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: control.prg => TCONTROL:HANDLEEVENT(1414)
Called from: combobox.prg => TCOMBOBOX:HANDLEEVENT(552)
Called from: TSCOMBO.PRG => TSCOMBO:HANDLEEVENT(56)
Called from: window.prg => _FWH(3252)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: entcar.prg => FWHPORTARIA(157)


Sr. Manuel, na TSBROWSE, o erro acontece aqui :

METHOD EditExit( nCol, nKey, uVar, bValid, lLostFocus ) CLASS TSBrowse

...

::lChanged := uValue != uVar

...


Obrigado Maestro!
Last edited by MGA on Tue Oct 14, 2008 2:19 pm, edited 1 time in total.
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby MGA » Mon Oct 13, 2008 6:19 pm

Up! :)
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Return to FiveWin para Harbour/xHarbour

Who is online

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