[IronPython] IronPython/Gtk#/TreeView ??

Scott Hatfield scott.hatfield at usis.com
Thu Apr 7 15:29:22 CEST 2005


# Here's a trivial example 

 

import sys

sys.LoadAssemblyByName("System.Drawing")

sys.LoadAssemblyByName("System.Windows.Forms")

 

from System.Windows.Forms import *

from System.Drawing import *

 

f = Form(Text="Trivial TreeView Example")

f.FormBorderStyle = FormBorderStyle.FixedDialog

f.StartPosition = FormStartPosition.CenterScreen

 

treeView = TreeView(Location=Point(30,30), Size=Size(200,200))

 

node = TreeNode("root")

node.Nodes.Add(TreeNode("child1"))

node.Nodes.Add(TreeNode("child2"))

node.Nodes.Add(TreeNode("child3"))

 

treeView.Nodes.Insert(0,node)

 

f.Controls.Add(treeView)

f.ShowDialog()

 

  _____  

From: users-ironpython.com-bounces at lists.ironpython.com
[mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of
Hector Miuler Malpica Gallegos
Sent: Wednesday, April 06, 2005 4:47 PM
To: users-ironpython.com at lists.ironpython.com
Subject: [IronPython] IronPython/Gtk#/TreeView ??

 

Hi, how I can use TreeView in IronPython?

C#
TreeStore  StoreReportesDiario = new TreeStore (typeof (string), typeof
(string));

Python??
StoreReportesDiario = Gtk.TreeStore() 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20050407/d7624ca9/attachment.html>


More information about the Ironpython-users mailing list