An example of the use of the Nictk.RowFrame container. It demonstrates the use of the add_row() method for adding to it rows which behave as horizontal frames (i.e. you can pack widget horizontally into them). You can set rows height as absolute, relative (percentual) or "absolute from bottom" values.
27winMain = Ntk.Main(200, 150, 400, 300,
"NtkRowFrame sample")
28rfr1 = Ntk.RowFrame(winMain, 0, 0,
"fill",
"fill")
29rfr1.config_children(Ntk.Label, relief=
"solid", bcolor =
"blue", fcolor=
"yellow",
46lab1 = Ntk.Label(rfr1,
"pack",
"20%",
"30%",
"fill", pad=(10, 0), content=
"A label in row 0")
47lab2 = Ntk.Label(rfr1,
"pack",
"20%",
"50%",
"fill", pad=(10, 0), content=
"This is a fixed height row")
50lab3 = Ntk.Label(rfr1,
"pack",
"20%",
"30%",
"60%", pad=(10, 0), content=
"A label in row 1")
51lab4 = Ntk.Label(rfr1,
"pack",
"20%",
"50%",
"60%", pad=(10, 0), content=
"This is a 30% height row")
54lab5 = Ntk.Label(rfr1,
"pack",
"20%",
"30%",
"60%", pad=(10, 0), content=
"A label in row 2")
55lab6 = Ntk.Label(rfr1,
"pack",
"20%",
"50%",
"60%", pad=(10, 0), content=
"Try to resize the window")
58lab7 = Ntk.Label(rfr1,
"pack", 10,
"30%", -10, pad=(10, 0), content=
"A label in row 3")
59lab8 = Ntk.Label(rfr1,
"pack", 10,
"50%", -10, pad=(10, 0), content=
"This is a fixed from bottom height row")