Combobox not change

Post Reply
souza.fo
Posts: 8
Joined: Thu Apr 22, 2010 1:31 pm

Combobox not change

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Combobox not change

Post by Antonio Linares »

Fabio,

Are you using it from a window or from a dialog ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
souza.fo
Posts: 8
Joined: Thu Apr 22, 2010 1:31 pm

Re: Combobox not change

Post by souza.fo »

I'm using Dialog.
I use TSBUTTON, but it does not work with Window.


Thanks,

Fabio Souza
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Combobox not change

Post by Antonio Linares »

Fabio,

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

Antonio Linares
www.fivetechsoft.com
Post Reply