demo_anchorlayout.py
changeset 76 fa5301e58eca
parent 71 cfd3445107b4
child 77 fc1989059e19
--- a/demo_anchorlayout.py	Fri Feb 01 09:34:15 2013 +0100
+++ b/demo_anchorlayout.py	Sat Feb 02 12:54:27 2013 +0100
@@ -26,17 +26,17 @@
         self.top.add(win, halign='left', valign='top')
         self.win = win
 
-        button_valign = Button('valign: ' + self.win.hints['valign'].selected)
+        button_valign = Button('valign: ' + self.win.hint_value('valign'))
         button_valign.name = 'button_valign'
         button_valign.add_handler('click', self.on_button_align_click)
         win.add(button_valign, halign='center', margin=Borders(t=2))
 
-        button_halign = Button('halign: ' + self.win.hints['halign'].selected)
+        button_halign = Button('halign: ' + self.win.hint_value('halign'))
         button_halign.name = 'button_halign'
         button_halign.add_handler('click', self.on_button_align_click)
         win.add(button_halign, halign='center', margin=Borders(t=4))
 
-        label_margin = Label(str(self.win.hints['margin']))
+        label_margin = Label(str(self.win.hint_value('margin')))
         label_margin.name = 'label_margin'
         label_margin.add_handler('draw', self.on_label_margin_draw)
         win.add(label_margin, halign='center', margin=Borders(t=6))
@@ -48,14 +48,14 @@
 
     def on_button_align_click(self, ev):
         align_type = ev.originator.label.split(':', 1)[0]
-        align = self.win.hints[align_type]
+        align = self.win.get_hint(align_type)
         align.select_next()
         ev.originator.label = '%s: %s' % (align_type, align.selected)
         self.top.emit('resize')
         return True
 
     def on_label_margin_draw(self, ev):
-        ev.originator.label = str(self.win.hints['margin'])
+        ev.originator.label = str(self.win.hint_value('margin'))
 
     def on_label_size_draw(self, ev):
         ev.originator.label = str(self.win.sizereq)