FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Combobox change events
Posts: 63
Joined: Mon Aug 02, 2010 05:38 PM
Combobox change events
Posted: Fri Mar 25, 2011 03:17 PM

I'm having a problem controlling the behavior of a combobox change event response.

Every time I update the array of list items, oClaim_Num:SetItems( aClaims ), the change event response is triggered. Is there any way I can restrict the change response to user input only?

Don

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Combobox change events
Posted: Fri Mar 25, 2011 05:27 PM
Code (fw): Select all Collapse
bChange:=oDbCombo:bChange
oDbCombo:bChange:=NIL
oDbCombo:SetItems(aMyNewArray)
oDbCombo:bChange:=bChange


Regards
Anser
Posts: 63
Joined: Mon Aug 02, 2010 05:38 PM
Re: Combobox change events
Posted: Sat Mar 26, 2011 12:14 PM

Regretably that didn't change anything.

Thanks for your help.

Don

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Combobox change events
Posted: Sun Mar 27, 2011 12:43 AM

Don,

If you do this do you hear a beep?

oCombo:bChange:=msgbeep()
oCombo:SetItems(aMyNewArray)
oCombo:bChange:=nil

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 63
Joined: Mon Aug 02, 2010 05:38 PM
Re: Combobox change events
Posted: Sun Mar 27, 2011 06:48 AM

Yes.

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Combobox change events
Posted: Mon Mar 28, 2011 08:19 AM
James Bott wrote:oCombo:=msgbeep()


It should be

Code (fw): Select all Collapse
oCombo:bChange:={ || msgbeep() }


EMG
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Combobox change events
Posted: Mon Mar 28, 2011 02:56 PM

Yes, of course.

Thanks, Enrico.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Combobox change events
Posted: Tue Apr 05, 2011 02:45 PM
DonDrew wrote:I'm having a problem controlling the behavior of a combobox change event response.

Every time I update the array of list items, oClaim_Num:SetItems( aClaims ), the change event response is triggered. Is there any way I can restrict the change response to user input only?

Don



Hello... you can try this change in the class

Code (fw): Select all Collapse
   METHOD Reset( lChanged ) INLINE Eval( ::bSetGet,;                                                     
                         If( ValType( Eval( ::bSetGet ) ) == "N", 0, "" ) ),;                            
                         ::nAt := 0, ::SendMsg( CB_RESETCONTENT ),;                                      
                         if( ( lChanged != NIL .and. lChanged ) .or. ( lChanged == NIL ), ::Change(), )  


   METHOD SetItems( aItems, lChanged ) INLINE ::Reset( lChanged ), ::aItems := aItems,;
                                    ::Default(),;
                                    if( ( lChanged != NIL .and. lChanged ) .or. ( lChanged == NIL ), ::Change(), )


use oClaim_Num:SetItems( aClaims, .F. )

Continue the discussion