Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bindevent & RaiseEvent and the Spinner control
Message
From
18/11/2003 05:22:20
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00849293
Message ID:
00850903
Views:
20
Yes, has a couple of weird side effects, but it works.

It still would be interresting to know how Raiseevent is supposed to work.

Thank's guys.

Peter

>Hi,
>
>Just put this.SetFocus() in the UpClick() and DownClick() event code.
>
>Regards,
>Viv
>
>>>
>
>Problem: The spinner UpClick, DownClick and InteactiveChange does not seem to affect the underlying controlsource until the control looses the focus, that is the valid event fires.
>
>So, a method that would run through the open views or dbf's and try to determine whether any changes have been made to the data by using GetNextModified(0) does not work.
>
>Having tried a number of approaches, including a Keyboard {'Tab'} to force the Valid event to fire (didn't), I then turned to RaiseEvent.
>
>The help says:
>
>You can use RAISEEVENT() to raise, or trigger, an event from a custom method. Though RAISEEVENT() applies primarily to custom methods, you can use it for raising native events and methods.
>
>So I tried RaiseEvent and BindEvent, both with no luck.
>
>Spinner.UpClick method: RAISEEVENT(This,'Valid')
>
>Or-
>
>Spinner.Init method:
>BINDEVENT(This,"Valid",This,"UpClick")
>
>or
>
>BINDEVENT(This,"Valid",This,"UpClick",1)
>
>Have I got it backwards, or is this just not possible?
>
>If not, what can I do to solve my problem?
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Reply
Map
View

Click here to load this message in the networking platform