Hi Roger
DC_VarToListBox function sets my PC Slow
Paulino Nolberto
A cordial greeting
DC_VarToListBox function sets my PC Slow
DC_VarToListBox function sets my PC Slow
Nolberto Paulino
Regards
Regards
Re: DC_VarToListBox function sets my PC Slow
how big is you Arraydigitsoft wrote:DC_VarToListBox function sets my PC Slow

hide Listbox when "fill" will speed up a lot.
greetings by OHR
Jimmy
Jimmy
Re: DC_VarToListBox function sets my PC Slow
Hi JimmyAuge_Ohr wrote:how big is you Arraydigitsoft wrote:DC_VarToListBox function sets my PC Slow
hide Listbox when "fill" will speed up a lot.
It is an array of 10 Items to Maximo
The slow when I give presents him several times to load the DCCOMBOBOX Array
Paulino Nolberto
Regards
Nolberto Paulino
Regards
Regards
Re: DC_VarToListBox function sets my PC Slow
I looked at the code and there is nothing there that looks unusual.
This may be a behavior of the XbpComboBox.
I have seen other problems with that class in the past.
It didn't generate events correctly.
This may be a behavior of the XbpComboBox.
I have seen other problems with that class in the past.
It didn't generate events correctly.
Code: Select all
FUNCTION DC_VarToListBox( oXbp, aVar, aMarked )
LOCAL bVar, aArray, i, oListBox, aArrayLeft, aArrayRight
IF oXbp:isDerivedFrom('XbpComboBox')
oListBox := oXbp:XbpListBox
ELSEIF oXbp:isDerivedFrom('XbpListBox')
oListBox := oXbp
ELSEIF oXbp:isDerivedFrom('DC_XbpPickList')
oXbp:leftListBox:clear()
oListBox := oXbp:leftListBox
IF Valtype(aVar) = 'A'
aArrayLeft := aVar
ELSE
bVar := oXbp:leftAnchor
aArrayLeft := Eval(bVar)
ENDIF
oXbp:rightListBox:clear()
oListBox := oXbp:rightListBox
IF Valtype(aMarked) = 'A'
aArrayRight := aMarked
ELSE
bVar := oXbp:dataLink
aArrayRight := Eval(bVar)
ENDIF
oXbp:SetData(aArrayLeft,aArrayRight)
RETURN nil
ELSE
RETURN nil
ENDIF
oListBox:clear()
IF Valtype(aVar) = 'A'
aArray := aVar
ELSE
bVar := oXbp:listBlock
aArray := Eval(bVar)
ENDIF
IF Valtype(aArray) = 'A'
FOR i := 1 TO LEN(aArray)
oListBox:Additem(aArray[i])
NEXT
IF oXbp:isDerivedFrom('XbpPickList')
oXbp:SetData(aArray)
ELSEIF Valtype(aMarked) = 'A' // Preset the list
oListBox:setData(aMarked, .T.)
DC_VarFromListBox(oXbp)
ENDIF
ENDIF
RETURN nil
The eXpress train is coming - and it has more cars.
Re: DC_VarToListBox function sets my PC Slow
Thanks Roger
I check the code and when it reaches this line oListBox: clear ()
remains firzado
if the annulus using *** oListBox: clear () on the line the combo box
limpra not the array but is not frizzy.
Paulino Nolberto
Best Regards
I check the code and when it reaches this line oListBox: clear ()
remains firzado
if the annulus using *** oListBox: clear () on the line the combo box
limpra not the array but is not frizzy.
Paulino Nolberto
Best Regards
rdonnay wrote:I looked at the code and there is nothing there that looks unusual.
This may be a behavior of the XbpComboBox.
I have seen other problems with that class in the past.
It didn't generate events correctly.
Code: Select all
FUNCTION DC_VarToListBox( oXbp, aVar, aMarked ) LOCAL bVar, aArray, i, oListBox, aArrayLeft, aArrayRight IF oXbp:isDerivedFrom('XbpComboBox') oListBox := oXbp:XbpListBox ELSEIF oXbp:isDerivedFrom('XbpListBox') oListBox := oXbp ELSEIF oXbp:isDerivedFrom('DC_XbpPickList') oXbp:leftListBox:clear() oListBox := oXbp:leftListBox IF Valtype(aVar) = 'A' aArrayLeft := aVar ELSE bVar := oXbp:leftAnchor aArrayLeft := Eval(bVar) ENDIF oXbp:rightListBox:clear() oListBox := oXbp:rightListBox IF Valtype(aMarked) = 'A' aArrayRight := aMarked ELSE bVar := oXbp:dataLink aArrayRight := Eval(bVar) ENDIF oXbp:SetData(aArrayLeft,aArrayRight) RETURN nil ELSE RETURN nil ENDIF oListBox:clear() IF Valtype(aVar) = 'A' aArray := aVar ELSE bVar := oXbp:listBlock aArray := Eval(bVar) ENDIF IF Valtype(aArray) = 'A' FOR i := 1 TO LEN(aArray) oListBox:Additem(aArray[i]) NEXT IF oXbp:isDerivedFrom('XbpPickList') oXbp:SetData(aArray) ELSEIF Valtype(aMarked) = 'A' // Preset the list oListBox:setData(aMarked, .T.) DC_VarFromListBox(oXbp) ENDIF ENDIF RETURN nil
Nolberto Paulino
Regards
Regards
Re: DC_VarToListBox function sets my PC Slow
Hi Roger
The problem was not the COMBOBOX Table or Database had a register in Blanc and the system to stay Very Slow
Thanks for your help
Paulino Nolberto
Regards
The problem was not the COMBOBOX Table or Database had a register in Blanc and the system to stay Very Slow
Thanks for your help
Paulino Nolberto
Regards
Nolberto Paulino
Regards
Regards