def create_vframe(text): frame = VFrame(Label(text)) frame.spacing = 5 frame.align = ALIGN_LEFT #frame.align = ALIGN_RIGHT #frame.set_align (ALIGN_RIGHT) return frame
def create_vframe (text): frame = VFrame (Label (text)) frame.spacing = 5 frame.align = ALIGN_LEFT #frame.align = ALIGN_RIGHT #frame.set_align (ALIGN_RIGHT) return frame
def create_alignment_view (): # Crate and display the different alignments. frm_main = VFrame (Label ("Alignment examples")) frm_main.topleft = 10, 10 # Top alignments. align_topleft = Alignment (100, 50) align_topleft.align = ALIGN_TOP | ALIGN_LEFT align_topleft.child = Button ("topleft") align_top = Alignment (100, 50) align_top.align = ALIGN_TOP align_top.child = Button ("top") align_topright = Alignment (100, 50) align_topright.align = ALIGN_TOP | ALIGN_RIGHT align_topright.child = Button ("topright") frm_top = HFrame () frm_top.children = align_topleft, align_top, align_topright # Centered alignments. align_left = Alignment (100, 50) align_left.align = ALIGN_LEFT align_left.child = Button ("left") align_center = Alignment (100, 50) align_center.align = ALIGN_NONE align_center.child = Button ("center") align_right = Alignment (100, 50) align_right.align = ALIGN_RIGHT align_right.child = Button ("right") frm_center = HFrame () frm_center.children = align_left, align_center, align_right # Bottom alignments. align_bottomleft = Alignment (100, 50) align_bottomleft.align = ALIGN_BOTTOM | ALIGN_LEFT align_bottomleft.child = Button ("bottomleft") align_bottom = Alignment (100, 50) align_bottom.align = ALIGN_BOTTOM align_bottom.child = Button ("bottom") align_bottomright = Alignment (100, 50) align_bottomright.align = ALIGN_BOTTOM | ALIGN_RIGHT align_bottomright.child = Button ("bottomright") frm_bottom = HFrame () frm_bottom.children = align_bottomleft, align_bottom, align_bottomright frm_main.children = frm_top, frm_center, frm_bottom return frm_main
def create_vframe (text): frame = VFrame (Label (text)) frame.spacing = 5 frame.align = ALIGN_LEFT return frame