FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour combobox QUESTION- solved
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
combobox QUESTION- solved
Posted: Sun Aug 10, 2014 05:31 PM

Hello,

In a Combobox, how can I detect if the user clicks on the [u:uhgdyag5]same[/u:uhgdyag5] item indicated in VAR clause?.

So as something as NO CHANGE clause (opposite as ON CHANGE ...)

Thank you!!.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: combobox QUESTION
Posted: Sun Aug 10, 2014 06:34 PM
elvira wrote:Hello,

In a Combobox, how can I detect if the user clicks on the same item indicated in VAR clause?.

So as something as NO CHANGE clause (opposite as ON CHANGE ...)

Thank you!!.


You can compare the new value with the old one. There is no NO CHANGE event. :-)

EMG
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: combobox QUESTION
Posted: Sun Aug 10, 2014 07:05 PM

Enrico,

Thank you but It does not work for me.

It is a question of focus. To detect when the user clicks on the combobox to the same ítem, so to show a message or change the focus to the next control.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: combobox QUESTION
Posted: Sun Aug 10, 2014 07:58 PM
elvira wrote:Enrico,

Thank you but It does not work for me.

It is a question of focus. To detect when the user clicks on the combobox to the same ítem, so to show a message or change the focus to the next control.


How about use the ON CHANGE event and compare new and old values?

EMG
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: combobox QUESTION
Posted: Sun Aug 10, 2014 08:57 PM

Enrico,

The ON CHANGE method isn´t fired as the user did not change the ítem on the combo.

That´s the problem I find.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: combobox QUESTION
Posted: Sun Aug 10, 2014 10:03 PM
elvira wrote:Enrico,

The ON CHANGE method isn´t fired as the user did not change the ítem on the combo.

That´s the problem I find.


Uh, it is clear now, sorry. :-)

EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: combobox QUESTION
Posted: Sun Aug 10, 2014 10:05 PM

One more try: can you check bCloseUp codeblock?

EMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: combobox QUESTION
Posted: Mon Aug 11, 2014 05:07 PM

From looking at the code for TCombo it looks like bSetGet will work. See the Change() method.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: combobox QUESTION
Posted: Mon Aug 11, 2014 06:53 PM

Hello

The bcloseup works !!. Thank You

Continue the discussion