Update of /cvsroot/pythoncard/PythonCard/components
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17777/components
Modified Files:
textarea.py
Log Message:
Added horizontalScrollbar to TextArea, updated ResourceEditor to include it.
Index: textarea.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/components/textarea.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** textarea.py 28 Sep 2004 14:41:50 -0000 1.28
--- textarea.py 30 Sep 2004 23:04:52 -0000 1.29
***************
*** 22,25 ****
--- 22,26 ----
'alignment' : {'presence' : 'optional', 'default' : 'left', 'values' :['left', 'right', 'center']},
'border' : {'presence' : 'optional', 'default' : '3d', 'values' : ['3d', 'none']},
+ 'horizontalScrollbar' : {'presence' : 'optional', 'default' : False},
'size' : { 'presence' : 'optional', 'default' : [ -1, 50 ] },
}
***************
*** 34,39 ****
def __init__( self, aParent, aResource ) :
self._border = aResource.border
-
if aResource.border == 'none':
borderStyle = wx.NO_BORDER
--- 35,45 ----
def __init__( self, aParent, aResource ) :
+ self._horizontalScrollbar = aResource.horizontalScrollbar
+ if aResource.horizontalScrollbar:
+ hScroll = wx.HSCROLL
+ else:
+ hScroll = 0
+
self._border = aResource.border
if aResource.border == 'none':
borderStyle = wx.NO_BORDER
***************
*** 54,58 ****
## style = wx.TE_RICH2 | wx.TE_PROCESS_TAB | wx.TE_MULTILINE | borderStyle | \
style = wx.TE_RICH2 | wx.TE_MULTILINE | borderStyle | \
! textfield.getAlignment(aResource.alignment) | \
wx.NO_FULL_REPAINT_ON_RESIZE | wx.CLIP_SIBLINGS,
name = aResource.name )
--- 60,64 ----
## style = wx.TE_RICH2 | wx.TE_PROCESS_TAB | wx.TE_MULTILINE | borderStyle | \
style = wx.TE_RICH2 | wx.TE_MULTILINE | borderStyle | \
! textfield.getAlignment(aResource.alignment) | hScroll |\
wx.NO_FULL_REPAINT_ON_RESIZE | wx.CLIP_SIBLINGS,
name = aResource.name )
***************
*** 112,115 ****
--- 118,128 ----
text = property(_getText, wx.TextCtrl.SetValue)
+ def _getHorizontalScrollbar( self ) :
+ return self._horizontalScrollbar
+
+ def _setHorizontalScrollbar ( self, aBool ) :
+ raise AttributeError, "horizontalScrollbar attribute is read-only"
+
+ horizontalScrollbar = property(_getHorizontalScrollbar, _setHorizontalScrollbar)
import sys
|