2012-01-16 16:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/gtwvg/wvgdatar.prg
! Synchronized: WvgListBox():getData() method.
* contrib/gtwvg/wvglistb.prg
* contrib/gtwvg/wvgtreev.prg
* contrib/gtwvg/wvgwnd.prg
+ Implemented: oXbp:pointerFocus instance variable for
WvtListBox() and WvtTreeView() objects.
If a control is laid onto a WvgCrt(), then this variable
can be set to FALSE to keep focus on console window.
INCOMPATIBLE: this behavior is not available in Xbase++.
This commit is contained in:
@@ -16,6 +16,19 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-01-16 16:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/gtwvg/wvgdatar.prg
|
||||
! Synchronized: WvgListBox():getData() method.
|
||||
|
||||
* contrib/gtwvg/wvglistb.prg
|
||||
* contrib/gtwvg/wvgtreev.prg
|
||||
* contrib/gtwvg/wvgwnd.prg
|
||||
+ Implemented: oXbp:pointerFocus instance variable for
|
||||
WvtListBox() and WvtTreeView() objects.
|
||||
If a control is laid onto a WvgCrt(), then this variable
|
||||
can be set to FALSE to keep focus on console window.
|
||||
INCOMPATIBLE: this behavior is not available in Xbase++.
|
||||
|
||||
2012-01-16 16:26 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qtcore/hbqtcore.hbx
|
||||
* contrib/hbqt/qtcore/qth/filelist.hbm
|
||||
|
||||
@@ -120,6 +120,8 @@ METHOD DataRef:getData()
|
||||
DO CASE
|
||||
CASE ::className == "EDIT"
|
||||
::sl_editBuffer := WVG_GetMessageText( ::hWnd, WM_GETTEXT, ::bufferLength + 1 )
|
||||
CASE ::className == "LISTBOX"
|
||||
::sl_editBuffer := WVG_LBGetCurSel( ::hWnd )+ 1
|
||||
ENDCASE
|
||||
|
||||
IF hb_isBlock( ::dataLink )
|
||||
|
||||
@@ -144,8 +144,8 @@ METHOD WvgListBox:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::wvgWindow:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::style := WS_CHILD + WS_OVERLAPPED + WS_TABSTOP
|
||||
::exStyle := WS_EX_CLIENTEDGE + WS_EX_LEFT + WS_EX_LTRREADING + WS_EX_RIGHTSCROLLBAR
|
||||
::style := WS_CHILD + WS_OVERLAPPED + WS_TABSTOP + WS_CLIPSIBLINGS
|
||||
::exStyle := WS_EX_CLIENTEDGE //+ WS_EX_LEFT + WS_EX_LTRREADING + WS_EX_RIGHTSCROLLBAR
|
||||
::className := "LISTBOX"
|
||||
::objType := objTypeListBox
|
||||
|
||||
@@ -196,29 +196,32 @@ METHOD WvgListBox:handleEvent( nMessage, aNM )
|
||||
CASE nMessage == HB_GTE_COMMAND
|
||||
IF aNM[ 1 ] == LBN_SELCHANGE
|
||||
::nCurSelected := WVG_LBGetCurSel( ::hWnd )+ 1
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
IF hb_isBlock( ::sl_itemMarked )
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
eval( ::sl_itemMarked, NIL, NIL, self )
|
||||
IF ::isParentCrt()
|
||||
ENDIF
|
||||
IF ::isParentCrt()
|
||||
IF ::pointerFocus
|
||||
::setFocus()
|
||||
ENDIF
|
||||
RETURN EVENT_UNHANDELLED
|
||||
ENDIF
|
||||
|
||||
ELSEIF aNM[ 1 ] == LBN_DBLCLK
|
||||
::editBuffer := ::nCurSelected
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
IF hb_isBlock( ::sl_itemSelected )
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
eval( ::sl_itemSelected, NIL, NIL, self )
|
||||
IF ::isParentCrt()
|
||||
ENDIF
|
||||
IF ::isParentCrt()
|
||||
IF ::pointerFocus
|
||||
::setFocus()
|
||||
ENDIF
|
||||
RETURN EVENT_UNHANDELLED
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
CASE nMessage == HB_GTE_NOTIFY
|
||||
@@ -234,7 +237,7 @@ METHOD WvgListBox:handleEvent( nMessage, aNM )
|
||||
RETURN WVG_GetCurrentBrush( aNM[ 1 ] )
|
||||
ENDIF
|
||||
|
||||
CASE nMessage == HB_GTE_ANY
|
||||
CASE nMessage == HB_GTE_ANY /* This will never be reached */
|
||||
IF aNM[ 1 ] == WM_LBUTTONUP
|
||||
::nCurSelected := WVG_LBGetCurSel( ::hWnd ) + 1
|
||||
IF hb_isBlock( ::sl_itemMarked )
|
||||
|
||||
@@ -197,27 +197,35 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM )
|
||||
DO CASE
|
||||
CASE aHdr[ NMH_code ] == NM_DBLCLK .OR. aHdr[ NMH_code ] == NM_RETURN
|
||||
::editBuffer := ::oItemSelected
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
IF hb_isBlock( ::sl_itemSelected )
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
Eval( ::sl_itemSelected, ::oItemSelected, { 0,0,0,0 }, Self )
|
||||
IF ::isParentCrt()
|
||||
ENDIF
|
||||
IF ::isParentCrt()
|
||||
IF ::pointerFocus
|
||||
::setFocus()
|
||||
ENDIF
|
||||
ELSE
|
||||
::setFocus()
|
||||
ENDIF
|
||||
RETURN .f.
|
||||
|
||||
CASE aHdr[ NMH_code ] == TVN_SELCHANGED
|
||||
::getSelectionInfo( aNM[ 2 ] )
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
IF hb_isBlock( ::sl_itemMarked )
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
Eval( ::sl_itemMarked, ::oItemSelected, { 0,0,0,0 }, Self )
|
||||
IF ::isParentCrt()
|
||||
ENDIF
|
||||
IF ::isParentCrt()
|
||||
IF ::pointerFocus
|
||||
::setFocus()
|
||||
ENDIF
|
||||
ELSE
|
||||
::setFocus()
|
||||
ENDIF
|
||||
RETURN .t.
|
||||
|
||||
|
||||
@@ -97,6 +97,8 @@ CLASS WvgWindow INHERIT WvgPartHandler
|
||||
DATA tabStop INIT .F.
|
||||
DATA visible INIT .T.
|
||||
|
||||
DATA pointerFocus INIT .T.
|
||||
|
||||
/* RUNTIME DATA */
|
||||
DATA dropZone INIT .F.
|
||||
DATA helpLink
|
||||
|
||||
Reference in New Issue
Block a user