WPF Group Box
import clr clr.AddReference("PresentationFramework") clr.AddReference("PresentationCore"); clr.AddReference('System.Data') clr.AddReference('System.Windows.Forms') import System from System import * from System.Windows import * from System.Windows.Controls import * from System.Windows.Forms import ( FolderBrowserDialog, DialogResult ) from Microsoft.Win32 import ( OpenFileDialog, SaveFileDialog ) import ctrl import vbox class WpfGroup(ctrl.WpfCtrl): def __init__(self,text=None): self.ctrl = GroupBox() if text: self.ctrl.Header = text def add_item(self,item): self.ctrl.AddChild(item) if __name__ == "__main__": import win app = win.Win("GroupBox Demo",320,240) g = WpfGroup("Buttons") b1 = Button(); b1.Content = "Button1" b2 = Button(); b2.Content = "Button2" vb = vbox.WpfVBox(); vb.add_item(b1) vb.add_item(b2) g.add_item(vb.ctrl) app.set_content(g.ctrl) app.run()
댓글 없음:
댓글 쓰기