Page 1 of 1

Combobox not change

Posted: Mon May 10, 2010 3:43 pm
by souza.fo
The code below does not work:

Code: Select all

STATIC aQtdes, cQtde

(...)

aQtdes := { "1", "2", "3", "4", "5", "6" }
cQtde := "1"

@ 13,98.5 COMBOBOX oCmbnQtde VAR cQtde OF oWndProdutos ITEMS aQtdes SIZE 20,75 PIXEL 

(...)

MudarQtde()

(...)

STATIC FUNCTION MudarQtde()
 oCmbnQtde:nAt := 2         // this does not work
 oCmbnQtde:SetText("2")   //this does not work
 oCmbnQtde:Select(2)        // this does not work
 oCmbnQtde:Refresh()  
RETURN .T.
 
Even if the style is changed (CBS_DROPDOWN, CBS_DROPDOWNLIST), still does not work.


Best Regards,

Fabio Souza

Re: Combobox not change

Posted: Wed May 12, 2010 9:07 pm
by Antonio Linares
Fabio,

Are you using it from a window or from a dialog ?

Re: Combobox not change

Posted: Fri May 14, 2010 1:24 pm
by souza.fo
I'm using Dialog.
I use TSBUTTON, but it does not work with Window.


Thanks,

Fabio Souza

Re: Combobox not change

Posted: Fri May 14, 2010 5:12 pm
by Antonio Linares
Fabio,

Please build and test samples\combos.prg and check if it works for you, thanks