summaryrefslogtreecommitdiffstats
path: root/Lib/symtable.py
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2010-11-25 16:08:06 (GMT)
committerEric Smith <eric@trueblade.com>2010-11-25 16:08:06 (GMT)
commit984bb58000df9cdba438c7ecb0bae5ad67878696 (patch)
tree87077ab2bbe949b5241ed9db5f2073572094ffde /Lib/symtable.py
parentc1d98d685032dd831ced32463b3f88cce6af4067 (diff)
downloadcpython-984bb58000df9cdba438c7ecb0bae5ad67878696.zip
cpython-984bb58000df9cdba438c7ecb0bae5ad67878696.tar.gz
cpython-984bb58000df9cdba438c7ecb0bae5ad67878696.tar.bz2
Issue #7094: Add alternate ('#') flag to __format__ methods for float, complex and Decimal. Allows greater control over when decimal points appear. Added to make transitioning from %-formatting easier. '#g' still has a problem with Decimal which I'll fix soon.
Diffstat (limited to 'Lib/symtable.py')
0 files changed, 0 insertions, 0 deletions
------------------------ +*/ +static int GetMaxOffset(register Listbox *listPtr) +{ + int maxOffset; + + maxOffset = listPtr->maxWidth - (Tk_Width(listPtr->tkwin) - 2*listPtr->inset - 2*listPtr->selBorderWidth) + listPtr->xScrollUnit - 1; + if (maxOffset < 0) { + maxOffset = 0; + } + maxOffset -= maxOffset % listPtr->xScrollUnit; + + return maxOffset; +} +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/library/demos/states.tcl b/library/demos/states.tcl index e76540d..09d2718 100644 --- a/library/demos/states.tcl +++ b/library/demos/states.tcl @@ -19,6 +19,15 @@ positionWindow $w label $w.msg -font $font -wraplength 4i -justify left -text "A listbox containing the 50 states is displayed below, along with a scrollbar. You can scan the list either using the scrollbar or by scan