I want to build some custom controls so I started with the idea of just
a text box with the intial text of "Enter Text Here"
So I opened classdesigner chose textbox as the class and a small form
opens with a sizeable text box. I added the code
self.Value = "Enter text Here"
debugout("Value Set")
in the afterInit method.
Then saved as Class just the selected text box as mTextBox.cdmxl.
Then created a new form added a sizer and then select custom class >
mTextbox.cdmxl
When I run the form the text box appears and works a a text box should
however the preset Value does not appear nor does the debugout message
Looking at the code it seems as if it olny creates a dTextBox class
with a few attributes and not a class based on mTextBox?
obj =
dabo.ui.dTextBox(currParent,attProperties={'NameBase':u'../mTextBox.cdxml'})
if currSizer:
currSizer.append(obj)
currSizer.setItemProps(obj, {'BorderSides': ['All'], 'Proportion': 0,
'HAlign': 'Center', 'VAlign': 'Top', 'Border': 0, 'Expand': True})
What am I missing?
How do you use ClassDesigner to create new classes then use them in a
form?
Mike Ayers
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/1261206701.30443.16.ca...@linux