Page 1 of 1

COMBOBOX CBS_SIMPLE

Posted: Thu Nov 19, 2009 6:35 pm
by Blessed
Hello, friends of the forum.
I need a thread with this;
I am having a problem with a combobox from resources in the RC is defined as follows:

Code: Select all

COMBOBOX 800, 35, 7, 180, 62, CBS_SIMPLE | CBS_SORT | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
In the code is as follows:

Code: Select all

REDEFINE COMBOBOX oGet VAR cOtrosBenef ITEMS aOtrosBenef ID 800 OF oCitas UPDATE
The combobox when introducing a new element in the list, the variable "cOtrosBenef" I get empty, and also Oget: VarGet (), not how to recover the value entered in the combobox, besides if I use the mouse to move the combobox loses the value entered.
There is another way to recover the value of the new item of the combobox, or some way to correct this.

I'm using 9.06 FWH

Greetings from Honduras :)

Re: COMBOBOX CBS_SIMPLE

Posted: Tue Nov 24, 2009 12:50 pm
by Antonio Linares
_,

Could you please test FWH\samples\combos.prg and combos.rc and check if you get the same problem ? thanks

Re: COMBOBOX CBS_SIMPLE

Posted: Tue Nov 24, 2009 2:05 pm
by Blessed
Antonio I appreciate your time.
I reviewed the example that follows, and the valid only works when you ENTER me with a new element, and with the tab key or the mouse on the combobox valid is ignored (Combo Simple).
Any suggestions are welcomed.

Greetings from Honduras :)

Re: COMBOBOX CBS_SIMPLE

Posted: Tue Nov 24, 2009 2:35 pm
by Antonio Linares
_,

Those combos contain a GET control object, so you can also use their VALIDs, i.e.:

oCbx1:oGet:bValid := { || MsgBeep(), .T. }

Please check if that helps you, thanks

Re: COMBOBOX CBS_SIMPLE

Posted: Tue Nov 24, 2009 3:59 pm
by Blessed
Antonio,

try this:

Code: Select all

   oCbx1:oGet:bValid := { || MsgInfo( "Hello word", oCbx1:oGet:VarGet() ), .T. }
 
And it ignores the valid, with the mouse, the enter key and tab; And just how such "combos.prg" say the object is not updated, when introducing a new element; any other suggestions?

Thanks for the help :wink:

Re: COMBOBOX CBS_SIMPLE

Posted: Thu Nov 26, 2009 4:06 pm
by Blessed
Okay, I'll have to use a combobox DROPDOWNLIST, and with new elements add a button, not pretty, but good.
Esperaro that in the not too distant future this is fixed, who knows maybe it will contribute.

Thanks for the help :wink: