示例#1
0
 def ToggleButton(self,
                  x=0,
                  y=0,
                  width=400,
                  height=40,
                  image=button_image,
                  image_highlighted=button_highlighted,
                  caption="Unlabeled",
                  batch=None,
                  group=None,
                  label_group=None,
                  font_name='ChunkFive Roman',
                  on_click=None,
                  on_toggle=None,
                  enabled=True):
     button = ToggleButton(self,
                           x=x,
                           y=y,
                           width=width,
                           height=height,
                           image=resize_button_image(image, 400, width),
                           image_highlighted=resize_button_image(
                               image_highlighted, 400, width),
                           caption=caption,
                           batch=(batch or self.batch),
                           group=(group or self.group),
                           label_group=(label_group or self.labels_group),
                           font_name=font_name,
                           enabled=enabled)
     if on_click:
         button.push_handlers(on_click=on_click)
     if on_toggle:
         button.push_handlers(on_toggle=on_toggle)
     return button
示例#2
0
 def Scrollbar(self, x=0, y=0, width=400, height=40, sb_width=40, sb_height=40, style=1, background_image=button_disabled, scrollbar_image=button_image, caption="Test", font_size=12, font_name=G.DEFAULT_FONT, batch=None, group=None, label_group=None, pos=0, on_pos_change=None):
     sb = ScrollbarWidget(self.controller.window, x=x, y=y, width=width, height=height,
              sb_width=sb_width, sb_height=sb_height,
              style=style, 
              background_image=resize_button_image(background_image, 400, width),
              scrollbar_image=resize_button_image(scrollbar_image, 400, sb_width), 
              caption=caption, font_size=font_size, font_name=font_name,
              batch=(batch or self.batch), group=(group or self.group), label_group=(label_group or self.labels_group),
              pos=pos, on_pos_change=on_pos_change)
     return sb
示例#3
0
 def Scrollbar(self, x=0, y=0, width=400, height=40, sb_width=40, sb_height=40, style=1, background_image=button_disabled, scrollbar_image=button_image, caption="Test", font_size=12, font_name=G.DEFAULT_FONT, batch=None, group=None, label_group=None, pos=0, on_pos_change=None):
     sb = ScrollbarWidget(self.controller.window, x=x, y=y, width=width, height=height,
              sb_width=sb_width, sb_height=sb_height,
              style=style, 
              background_image=resize_button_image(background_image, 400, width),
              scrollbar_image=resize_button_image(scrollbar_image, 400, sb_width), 
              caption=caption, font_size=font_size, font_name=font_name,
              batch=(batch or self.batch), group=(group or self.group), label_group=(label_group or self.labels_group),
              pos=pos, on_pos_change=on_pos_change)
     return sb
示例#4
0
 def ToggleButton(self, x=0, y=0, width=400, height=40, image=button_image, image_highlighted=button_highlighted, caption="Unlabeled", batch=None, group=None, label_group=None, font_name='ChunkFive Roman', on_click=None, on_toggle=None, enabled=True):
     button = ToggleButton(self, x=x, y=y, width=width, height=height, image=resize_button_image(image, 400, width), image_highlighted=resize_button_image(image_highlighted, 400, width), caption=caption, batch=(batch or self.batch), group=(group or self.group), label_group=(label_group or self.labels_group), font_name=font_name, enabled=enabled)
     if on_click:
         button.push_handlers(on_click=on_click)
     if on_toggle:
         button.push_handlers(on_toggle=on_toggle)
     return button