[ENH]ScrollPane (scrollBarHidden: true)
Karl Ramberg
karl.ramberg at chello.se
Tue May 23 18:07:03 UTC 2000
Ok Ok! I promise, no more postings from me on this subject today :-)
Here are the fix with the fix etc.
Integrate this into your changeset and it might be correct. Who am I to tell :-)
Karl
Doug Way wrote:
> On Tue, 23 May 2000, Karl Ramberg wrote:
>
> > Doug Way wrote:
> >
> > > FYI, I created a similar but more elaborate changeset, which automatically
> > > hides scrollbars when the contents of a pane are small enough to fit in
> > > the pane.
> > >
> > > The changeset works for Squeak 2.6/2.7 and seems to work for 2.8alpha,
> > > although I haven't tested that thoroughly. It's at
> > > http://www.mindspring.com/~dway/smalltalk/HiddenScrollBar26.cs .
> >
> > It looks good and is much nicer than the one I did :-) One problem is
> > when inboard scrollboards are turned on they wount show up :-(
> >
> > Fix that and this should be a perfect preference in the scrolling category.
>
> Hmm, I'm not seeing this problem. (in 2.7 or 2.8alpha)
>
> If I file in the changeset, turn on inboardScrollbars and open a browser,
> the scrollbar does appear in the (top-left) class category pane, but not
> in any of the empty panes. If I select Kernel-Objects, a scrollbar
> appears in the class pane (second-to-left). If I then select
> Kernel-Magnitudes, the scrollbar dissappears from the class pane, as it
> should, since there are only three classes.
>
> When testing this just now, I did notice a smaller bug... if you turn on
> inboardScrollbars, it automatically puts them on the right, ignoring the
> scrollBarsOnRight preference. I'll try to fix this.
>
> - Doug Way
> EAI/Transom Technologies, Ann Arbor, MI
> http://www.transom.com
> dway at mat.net, @eai.com
-------------- next part --------------
'From Squeak2.8alpha of 19 February 2000 [latest update: #2158] on 23 May 2000 at 8:01:10 pm'!
!PluggableTextMorph methodsFor: 'geometry' stamp: 'kfr 5/23/2000 19:58'!
resetExtent
"Reset the extent while maintaining the current selection. Needed when resizing while the editor is active (when inside the pane)."
| tempSelection |
textMorph notNil ifTrue:
["the current selection gets munged by resetting the extent, so store it"
tempSelection _ self selectionInterval.
"don't reset it if it's not active"
tempSelection = (Interval from: 0 to: 1) ifTrue: [^self].
self extent: self extent.
self setSelection: tempSelection].
! !
-------------- next part --------------
'From Squeak2.8alpha of 19 February 2000 [latest update: #2158] on 23 May 2000 at 7:01:34 pm'!
!ScrollPane methodsFor: 'initialization' stamp: 'kfr 5/23/2000 18:58'!
initialize
super initialize.
hasFocus _ false.
borderWidth _ 2. borderColor _ Color black.
retractableScrollBar _ (Preferences valueOfFlag: #inboardScrollbars) not.
scrollBarOnLeft _ (Preferences valueOfFlag: #scrollBarsOnRight) not.
scrollBar := ScrollBar new model: self slotName: 'scrollBar'.
scrollBar borderWidth: 1; borderColor: Color black.
scroller := TransformMorph new color: Color transparent.
scroller offset: -3 at 0.
self addMorph: scroller.
self on: #mouseEnter send: #mouseEnter: to: self.
self on: #mouseLeave send: #mouseLeave: to: self.
self extent: 150 at 120! !
More information about the Squeak-dev
mailing list
|