[erlang-questions] Help withwxErlang dragging

eigenfunction emeka_1978@REDACTED
Tue Mar 20 19:05:24 CET 2012


 Frame = wxFrame:new(wx:new(),-1,"Frame Without Border",[{style, ?
wxCLIP_CHILDREN bor
													?wxFRAME_NO_TASKBAR bor
													?wxNO_BORDER bor
													?wxFRAME_SHAPED}]),

wxFrame:connect(Frame,motion,[{callback,fun(Ev,Obj) ->
onMouse(Ev,Frame) end}]),
...


onMouse(Ev,Obj) ->
	io:format("on mouse called ..."),
	case wxMouse:dragging(Ev#wx.event)
of                                      %% Error!
		false ->0
	
ok;
%% no dragging
		_ ->
			%% get the position of the mouse and
                        %% pass it around somehow

Any idea about how i can go about implementing "onMouse()" ?

Thank.




More information about the erlang-questions mailing list