|
From: <lc...@us...> - 2012-01-28 11:49:30
|
Revision: 1837
http://hwgui.svn.sourceforge.net/hwgui/?rev=1837&view=rev
Author: lculik
Date: 2012-01-28 11:49:23 +0000 (Sat, 28 Jan 2012)
Log Message:
-----------
2012-01-28 10:00 UTC-0300 Luiz Rafael Culik (luiz at xharbour.com)
* source/hcombo.prg
! ajuste no metodo redefine para suportar ledit e ltext
! habilitado o oninteractivechange para metodo redefine
* source/hdatepicker.prg
! ajuste no metodo redefine para mostrar ou n?\195?\163o hora
* include/guilib.ch
! ajustado o comando redefine get combobox para suportar clasulas text e edit
Modified Paths:
--------------
trunk/hwgui/Changelog
trunk/hwgui/include/guilib.ch
trunk/hwgui/source/hcombo.prg
trunk/hwgui/source/hdatepic.prg
Modified: trunk/hwgui/Changelog
===================================================================
--- trunk/hwgui/Changelog 2012-01-23 10:32:12 UTC (rev 1836)
+++ trunk/hwgui/Changelog 2012-01-28 11:49:23 UTC (rev 1837)
@@ -8,6 +8,15 @@
2002-12-01 23:12 UTC+0100 Foo Bar <fo...@fo...>
*/
+2012-01-28 10:00 UTC-0300 Luiz Rafael Culik (luiz at xharbour.com)
+ * source/hcombo.prg
+ ! ajuste no metodo redefine para suportar ledit e ltext
+ ! habilitado o oninteractivechange para metodo redefine
+ * source/hdatepicker.prg
+ ! ajuste no metodo redefine para mostrar ou n\xE3o hora
+ * include/guilib.ch
+ ! ajustado o comando redefine get combobox para suportar clasulas text e edit
+
2012-01-23 08:40 UTC-0300 Luis Fernando Basso <lfbasso at via-rs.net>
* source/hedit.prg
* FUNCTION NextFocus
Modified: trunk/hwgui/include/guilib.ch
===================================================================
--- trunk/hwgui/include/guilib.ch 2012-01-23 10:32:12 UTC (rev 1836)
+++ trunk/hwgui/include/guilib.ch 2012-01-28 11:49:23 UTC (rev 1837)
@@ -1270,10 +1270,12 @@
[ WHEN <bGfocus> ] ;
[ VALID <bLfocus> ] ;
[ ON INTERACTIVECHANGE <bIChange> ] ;
+ [ <edit: EDIT> ] ;
+ [ <text: TEXT> ] ;
=> ;
[<oCombo> := ] HComboBox():Redefine( <oWnd>,<nId>,<vari>, ;
{|v|Iif(v==Nil,<vari>,<vari>:=v)}, ;
- <aItems>,<oFont>,,,,<bChange>,<ctoolt>,<bGfocus>, <bLfocus>,<bIChange>,<nDisplay>, <nMaxLength>)
+ <aItems>,<oFont>,,,,<bChange>,<ctoolt>,<bGfocus>, <bLfocus>,<bIChange>,<nDisplay>, <nMaxLength>,<.edit.>,<.text.>)
#xcommand REDEFINE GET COMBOBOXEX [ <oCombo> VAR ] <vari> ;
ITEMS <aItems> ;
Modified: trunk/hwgui/source/hcombo.prg
===================================================================
--- trunk/hwgui/source/hcombo.prg 2012-01-23 10:32:12 UTC (rev 1836)
+++ trunk/hwgui/source/hcombo.prg 2012-01-28 11:49:23 UTC (rev 1837)
@@ -68,7 +68,7 @@
aItems, oFont, bInit, bSize, bPaint, bChange, ctooltip, lEdit, lText, bGFocus, tcolor, ;
bcolor, bLFocus, bIChange, nDisplay, nhItem, ncWidth, nMaxLength )
METHOD Activate()
- METHOD Redefine( oWndParent, nId, vari, bSetGet, aItems, oFont, bInit, bSize, bPaint, bChange, ctooltip, bGFocus, bLFocus, bIChange, nDisplay, nMaxLength )
+ METHOD Redefine( oWndParent, nId, vari, bSetGet, aItems, oFont, bInit, bSize, bPaint, bChange, ctooltip, bGFocus, bLFocus, bIChange, nDisplay, nMaxLength, ledit, ltext )
METHOD INIT()
METHOD onEvent( msg, wParam, lParam )
METHOD Requery()
@@ -194,10 +194,19 @@
RETURN Nil
METHOD Redefine( oWndParent, nId, vari, bSetGet, aItems, oFont, bInit, bSize, bPaint, ;
- bChange, ctooltip, bGFocus, bLFocus, bIChange, nDisplay, nMaxLength ) CLASS HComboBox
+ bChange, ctooltip, bGFocus, bLFocus, bIChange, nDisplay, nMaxLength,ledit, ltext ) CLASS HComboBox
HB_SYMBOL_UNUSED( bLFocus)
- HB_SYMBOL_UNUSED( bIChange )
+// HB_SYMBOL_UNUSED( bIChange )
+ IF lEdit == Nil
+ lEdit := .f.
+ ENDIF
+ IF lText == Nil
+ lText := .f.
+ ENDIF
+
+ ::lEdit := lEdit
+ ::lText := lText
//::nHeightBox := INT( 22 * 0.75 ) // Meets A 22'S EDITBOX
IF !Empty( nDisplay ) .AND. nDisplay > 0
@@ -248,12 +257,18 @@
IF bGFocus != Nil .AND. bSetGet == Nil
::oParent:AddEvent( CBN_SETFOCUS, self, { | o, id | ::When( o:FindControl( id ) ) },, "onGotFocus" )
ENDIF
+ IF bIChange != Nil .AND. ::lEdit
+ ::bchangeInt := bIChange
+ // ::oParent:AddEvent( CBN_EDITUPDATE, Self, { | o, id | __InteractiveChange( o:FindControl( id ) ) },, "interactiveChange" )
+ ::oParent:AddEvent( CBN_EDITUPDATE, Self, { | o, id | ::InteractiveChange( o:FindControl( id ) ) },, "interactiveChange" )
+ ENDIF
+
::oParent:AddEvent( CBN_SELENDOK, Self, { | o, id | ::onSelect( o:FindControl( id ) ) },,"onSelect" )
//::Refresh() // By Luiz Henrique dos Santos
::oParent:AddEvent( CBN_DROPDOWN, Self, { | o, id | ::onDropDown( o:FindControl( id ) ) },,"ondropdown" )
::oParent:AddEvent( CBN_CLOSEUP, Self, {|| ::ldropshow := .F. }, ,)
- ::Requery()
+ //::Requery()
RETURN Self
Modified: trunk/hwgui/source/hdatepic.prg
===================================================================
--- trunk/hwgui/source/hdatepic.prg 2012-01-23 10:32:12 UTC (rev 1836)
+++ trunk/hwgui/source/hdatepic.prg 2012-01-28 11:49:23 UTC (rev 1837)
@@ -83,7 +83,7 @@
RETURN Self
METHOD Redefine( oWndParent, nId, vari, bSetGet, oFont, bSize, bInit, ;
- bGfocus, bLfocus, bChange, ctooltip, tcolor, bcolor ) CLASS HDatePicker
+ bGfocus, bLfocus, bChange, ctooltip, tcolor, bcolor, lShowTime ) CLASS HDatePicker
Super:New( oWndParent, nId, 0, 0, 0, 0, 0, oFont, bInit, ;
bSize,, ctooltip, tcolor, bcolor )
HWG_InitCommonControlsEx()
@@ -91,7 +91,7 @@
::tValue := IIF( vari == Nil .OR. Valtype( vari ) != "C", SPACE(6), vari )
::bSetGet := bSetGet
::bChange := bChange
-
+ ::lShowTime := lShowTime
IF bGfocus != Nil
::oParent:AddEvent( NM_SETFOCUS, Self, bGfocus, .T., "onGotFocus" )
ENDIF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|