Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #2499
| From | "Jozo" <racunalo@os.t-com.hr> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Dispatch of ListView Class |
| Date | 2011-11-23 23:37 +0100 |
| Organization | T-Com |
| Message-ID | <jajsid$fs7$1@ss408.t-com.hr> (permalink) |
Hi all !
Well, I finally began to work with Vo28 SP3 2837 (overlooking to Vulcan).
For now, I have removed some problems in my code ( ACCESS, ASIGN, PSZ-
STRING ) but I have some problems.
I made my small class _LstView based on class DbListView of Eduardo
Fernandes (posted on KnowVo.com 2002).
Problem is the Dispatch method that does not work properly even in my class
or in his. Here is it:
METHOD DisPatch( oEvent ) CLASS _LstView
LOCAL nReturn AS LONGINT
LOCAL oLVI AS OBJECT
nReturn := SUPER:Dispatch(oEvent)
IF oEvent:Message == WM_LBUTTONDOWN .or. ; // Mouse Single Click
oEvent:Message == WM_LBUTTONDBLCLK // Mouse Double Click
// Return in with ListViewColumn occurred the mouse click
self:GetColumnAtPosition(oEvent:Position)
// Return in with ListViewItem occurred the mouse click.
self:GetItemAtPosition(oEvent:Position)
// if occurred a mouse click in over checkbox area
IF SELF:_GetCheckBoxAtPosition(oEvent:Position)
oLVI:= SELF:GetItemAtPosition(oEvent:Position)
IF oLVI != NULL_OBJECT
SELF:_SetCheckedItems(oLVI)
ENDIF
ENDIF
ENDIF
RETURN (nReturn)
The problem is in oEvent:Position ( Error code 16: [Not exported
ariable] )
In VO 2.7 Debuger shows this event as an event of CLASS MouseEvent and all
is ok but in Vo28 this Event is only Event.
Since I am not familiar with C language and also with any Dispatch method I
hope someone can help me.
Thank in advance
Jozo
P.S. Here are another methods of class _LstView:
CLASS _LstView INHERIT ListView
PROTECT aCheckedItems := {} AS ARRAY // ListViewItems checked
METHOD Init( oOwner, nID, oPoint, oDimension ) CLASS _LstView
SUPER:Init( oOwner, nID, oPoint, oDimension )
RETURN SELF
HIDDEN METHOD _GetCheckBoxAtPosition(oPoint) CLASS _LstView
// Return true/false if a mouse click occurred in checkbox area.
LOCAL strucHitTestInfo IS _winLV_HitTestInfo
LOCAL nReturn AS LONGINT
LOCAL lChecked AS LOGIC
IF !SELF:checkboxes
RETURN (FALSE)
ENDIF
lChecked:=FALSE
oPoint := __WCConvertPoint(SELF,oPoint) // don“t remove
strucHitTestInfo.Pt.X := oPoint:X
strucHitTestInfo.Pt.Y := oPoint:Y
nReturn := SendMessage( SELF:handle() , LVM_HITTEST , 0, LONG(_CAST,
@strucHitTestInfo))
IF nReturn != -1
IF strucHitTestInfo.flags == LVHT_ONITEMSTATEICON
lChecked:=TRUE
ENDIF
ENDIF
RETURN (lChecked)
STRUCT _winLV_HitTestInfoEx ALIGN 1
// Extended version of _winLV_HITTESTINFO for latest COMCTL32.
// Used in GetColumnAtPosition method. Need COMCTL32.DLL dated May/1999
or newer.
MEMBER Pt IS _winPoint
MEMBER Flags AS DWORD
MEMBER iItem AS INT
MEMBER iSubItem AS INT
Back to comp.lang.clipper.visual-objects | Previous | Next — Next in thread | Find similar | Unroll 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