Comments (8)
Yes, that's due to the cwDropDownList being developed primarily as DataBound-Control.
(where one shouldn't raise Events, when the "bound state" was not changed)...
If you need that badly in your DropDownList-scenario, then you can (also in UserCode) simply
add an additional EventListener (on the DropDownLists internal VList.Widget).
Private WithEvents VListW As cWidgetBase 'somewhere at Class-Level
'shortly after instancing your DropDownList-Widget:
Set VListW = Combo1.VList.Widget 'assign and add a reference to the internal VList-Base
'now you can sink e.g. VListW_MouseUp and react there instead of your Combo_Click
Private Sub VListW_MouseUp(Button As Integer, Shift As Integer, ByVal x As Single, ByVal y As Single)
Debug.Print Combo1.DataSource.FieldValue(0)
End Sub
HTH
Olaf
from site.
This seems an issue of vbRichclient vbWidgets cwDropDownList.cls
https://github.com/vbRichClient/vbWidgets/blob/master/cwDropDownList.cls
On mousewheel rotation , event Click is raised.
I still haven't understand how to fix
More precisely it's related to (sub)Class cwVList (of cwDropDownList): https://github.com/vbRichClient/vbWidgets/blob/master/cwVList.cls
On mousewheel on DropDownList there's VList.ListIndex = NewIndex
and in
Public Property Let ListIndex(ByVal NewValue As Long)
.....
.....
RaiseEvent Click <<<------- This raises VList_Click *
W.RaiseBubblingEvent Me, "Click"
End Property
and
*
Private Sub VList_Click()
.....
.....
RaiseEvent Click <<<------- This raises click event of DropDownList
End Sub
.... really a mess !
from site.
Good detective work!
Without modifying the cwVList + cwDropDownList directly, the only workarounds I can think of are probably tedious for users. For example, you could add a new "add node" button, which the user has to click after closing the list. But extra clicks are usually not good for usability. đ
But maybe this would be necessary to solve the mousewheel problem anyway - for example, if the user uses the mousewheel to change the selected effect, and the Click()
event doesn't fire, how would the user add the node? I guess they would have to open the dropdown, and click the name again... which isn't very intuitive.
I'm not sure the best solution.
from site.
At the moment, I resolved it roughly
I modified cwDropDownList (since I already use a custom version of it)
I added to variables
Public OkToUseMouseWheel As Boolean
Private Wheeling As Boolean
Private Sub Class_Initialize()
OkToUseMouseWheel = True
in FX-Selector .OkToUseMouseWheel = False
(in ResizeMode and FileName-Prefix/Postfix it's True
by default)
and used these 2 variables this way:
Private Sub W_MouseWheel(ByVal MouseKeys As Long, ByVal Rotation As Long, ByVal LineOffset As Long, ByVal xAbs As Single, ByVal yAbs As Single)
If DropDown.PopupWidget Is Nothing And VList.ListCount > 0 And W.Enabled Then
Wheeling = True
Dim NewIndex: NewIndex = VList.ListIndex + LineOffset
If NewIndex < 0 Then NewIndex = 0 Else If NewIndex >= VList.ListCount Then NewIndex = VList.ListCount - 1
VList.ListIndex = NewIndex
Wheeling = False
End If
End Sub
Private Sub VList_Click()
.....
' If DoRaise Then
' RaiseEvent Click
' W.RaiseBubblingEvent Me, "Click"
' End If
If OkToUseMouseWheel Then
If DoRaise Then
RaiseEvent Click
W.RaiseBubblingEvent Me, "Click"
End If
Else
If DoRaise Then
If Not (Wheeling) Then
RaiseEvent Click
W.RaiseBubblingEvent Me, "Click"
End If
End If
End If
End Sub
At the moment seems to work
But maybe this would be necessary to solve the mousewheel problem anyway - for example, if the user uses the mousewheel to change the selected effect, and the Click() event doesn't fire, how would the user add the node? I guess they would have to open the dropdown, and click the name again... which isn't very intuitive.
Yes, and at the moment, (with this fix), even if mousewheel do not fire Click event, when user open the dropdown, and click the name again, nothing happens.
This was an Old issue: (always of cwDropDownList)
- Click a name, and a NodeFX will be added.
- Click again the Same Name and nothing happens (Click event not fired)
Anyway, I think I will update PhotoModularFX only with this fix (Do not add nodeFX on mousewheel)
from site.
Did you already read my comments reexre?
If disabling the MouseWheel is all you want, you can do it on the outside
(in your User-Code) by setting:
MyComboList.Widget.ImplementsWheelMessages = False
That's all.
Olaf
from site.
Did you already read my comments reexre?
If disabling the MouseWheel is all you want, you can do it on the outside
(in your User-Code) by setting:
MyComboList.Widget.ImplementsWheelMessages = FalseThat's all.
Olaf
Thanks
I'll use ImplementsWheelMessages = False. (more straightforward)
By the way,
Why when I click an item the Click event is fired,
and if I click again the Same Item (already highlighted/selected), the Click event is not fired ?
( If I would add 2 "BLUR"-Nodes, for example, I would click 2 times the same Item (Blur), but only the first time works (Click fired) )
from site.
Thank you very much!!!
I used:
Set cmbFxSelectorVLIST = cmbFxSelector.VList
( without .Widget
)
Private Sub cmbFxSelectorVLIST_MouseUpClick()
Works perfectly !
from site.
Updated https://miorsoft.github.io/Site/PhotoModularFX/
from site.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from site.