Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #2508

Re: Dispatch of ListView Class

From "Jozo" <racunalo@os.t-com.hr>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Dispatch of ListView Class
Date 2011-11-24 21:51 +0100
Organization T-Com
Message-ID <jamaoh$t34$1@ss408.t-com.hr> (permalink)
References <jajsid$fs7$1@ss408.t-com.hr> <kvbsc7hjm7eb5jg346frkvcbqujuasa7e2@4ax.com> <jalket$irb$1@ss408.t-com.hr> <p7osc7p2o6svclo22t5266jhnutn32l91u@4ax.com>

Show all headers | View raw


Thank you Dick.
I found solution based on your example
Here it is:

LOCAL oMoEvt AS MouseEvent
...
IF oEvent:Message == WM_LBUTTONDOWN .OR. ; // Mouse Single Click
    oEvent:Message == WM_LBUTTONDBLCLK    // Mouse Double Click
    oMoEvt := MouseEvent{oEvent}
    IF SELF:_GetCheckBoxAtPosition(oMoEvt:Position)
...

Jozo



"D.J.W. van Kooten" <public@ic2remove.this.com> wrote in message 
news:p7osc7p2o6svclo22t5266jhnutn32l91u@4ax.com...
> On Thu, 24 Nov 2011 15:30:52 +0100, "Jozo" <racunalo@os.t-com.hr>
> wrote:
>
>>Hello Dick,
>>
>>> If you look in the help under ListViewMouseEvent Class you will see
>>> that the event has an access Position.
>>Yes, I know that, but as I have said,  in VO 2.7 Debuger shows this event 
>>as
>>an event of MouseEvent Class and all
>>is ok but in Vo28 this Event is only Event Class, Class Event that has not
>>properties Position.
>>
>>My _LstView based on class DbListView of Eduardo Fernandes (posted on
>>KnowVo.com 2002) where you can download this example.
>>This example has this problem too. When the mouse move on the second row 
>>is
>>then activated Dispatch wich generates general Event instead MouseEvent.
>>
>>I am indexed but nothing.
>>
> Jozo
>
> That's tue. In the SDK you'll find:
>
> ACCESS Position AS POINT PASCAL CLASS ListViewMouseEvent
> RETURN __WCConvertPoint(SELF:Control, Point{nX, nY})
>
> So the event must be a ListViewMouseEvent.
>
> You could directly use this code but then you need nX and nY (for
> which I think I have some code too if you need it).
>
> But I think there's a quicker way:
>
> If you look in the SDK:
>
> METHOD Dispatch(oEvent) CLASS Control
>
> you'll find:
>
> CASE msg == WM_LBUTTONDOWN .OR.;
> msg == WM_RBUTTONDOWN .OR.;
> msg == WM_MBUTTONDOWN .OR. ;
> msg == WM_XBUTTONDOWN
> //PP-030904 Xbutton
> //uRet :=
> SELF:MouseButtonDown(__ObjectCastClassPtr(oEvt, __pCMouseEvent))
> uRet := SELF:MouseButtonDown(MouseEvent{oEvt})
>
> So I think that  MouseEvent{oEvt}  can do the trick as the
> Mousebuttondown also needs a MouseEvent and uses the control event as
> parameter. See MouseEvent Class in the help.
>
> No idea if anything was changed since 2.7 (I don't use the event in
> listboxes) but hopefully it helps you running the program.
>
> Dick
>
>
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Dispatch of ListView Class "Jozo" <racunalo@os.t-com.hr> - 2011-11-23 23:37 +0100
  Re: Dispatch of ListView Class D.J.W. van Kooten <public@ic2remove.this.com> - 2011-11-24 12:55 +0100
    Re: Dispatch of ListView Class "Jozo" <racunalo@os.t-com.hr> - 2011-11-24 15:30 +0100
      Re: Dispatch of ListView Class D.J.W. van Kooten <public@ic2remove.this.com> - 2011-11-24 16:33 +0100
        Re: Dispatch of ListView Class "Willie Moore" <williem@wmconsulting.com> - 2011-11-24 11:07 -0600
          Re: Dispatch of ListView Class D.J.W. van Kooten <public@ic2remove.this.com> - 2011-11-24 23:49 +0100
        Re: Dispatch of ListView Class "Jozo" <racunalo@os.t-com.hr> - 2011-11-24 21:51 +0100

csiph-web