Question: i am new to python programming and i have still difficulties at some points. Now I struggle with recursive functions.
My assignment is to sum from 0 to 3 the square of that number, by using recursive functions My code so far looks like this:

```
sum = 0
n = 3
i = 1

def summe(i,sum):
    sum = sum +(i*i)
    if(i <= n):
       i = i+1
       print sum
       return summe(i, sum)
    else:
       print sum

```

The Output is empty, even the sum in the if-clause isnt printed out. I followed the examples I found online, but I dont see where i did something particular wrong.

Answer: 
I found that the Tkinter Font object has a metrics() method, that gives its height as "linespace". That allows the row height to be scaled dynamically:

```
try:
    from tkinter.font import Font
    from tkinter.ttk import Style, Treeview
    from tkinter import *         
except:
    from tkFont import Font
    from ttk import Style, Treeview
    from Tkinter import *

font=Font(family='Arial', size=20)
font.metrics()
#output: {'ascent': 31, 'descent': 7, 'linespace': 38, 'fixed': 0}

```

With that, you can get the font height with:

```
font.metrics()['linespace']
#output: 38

```

Then use it to set the rowheight in your Treeview widget:

```
fontheight=font.metrics()['linespace']

style=Style()
style.configure('Calendar.Treeview', font=font, rowheight=fontheight)   

tree=Treeview(style='Calendar.Treeview')

```

Changing the font object parameters comfortably updates the Treeview widget, but the rowheight doesn't get updated, and needs to be redone. So for example, scaling the font size with a keyboard shortcut may look like this:

```
def scaleup(event):
    font['size']+=1
    style.configure('Calendar.Treeview', rowheight=font.metrics()['linespace'])

def scaledown(event):
    font['size']-=1
    style.configure('Calendar.Treeview', rowheight=font.metrics()['linespace'])

tree.bind('<Control-equal>', scaleup)
tree.bind('<Control-minus>', scaledown)

```

I actually wanted to do the same with Control-MouseWheel, but didn't figure out the behavior yet (Would be glad to hear how that works).

Hope this comes handy.
> 
> How can I change the height of the rows in the treeview as in prevoius attempts font size can be increased but the row height does not increase with font size. - STILL AWAITING HELP
> 
> 
> 

In case you are still awaiting help on this one, there *is* a [way](https://groups.google.com/forum/#!topic/comp.lang.tcl/dv2urOQTeUA) to change the row height, though that google groups thread says that it isn't officially supported by Tk:

```
#apply any configuration options
ttk.Style().configure('Treeview',rowheight=30)

```