On Aug 30, 2008, at 2:05 PM, Bob Mathias - Sysero llc Business Group
wrote:
> I am new to both dabo and python. I have a main application with
> five
> dButtons that are group together in a Horizontal sizer at the top of
> my
> form. On the left side I have a group of six dButtons in a Vertical
> Sizer. What I want to do is when the user press the Customer Button
> in
> my onHit I want change all the caption for each Buttons in my Vertical
> Size.
>
> 1) My question is how do I access each dButton.Caption field as an
> array or some other form?
You have to have some way to reference those buttons. One way to do
this is to use the full containership path by joining the Name
properties of the contained objects in dot notation. One example might
be: self.Form.mainPanel.dButton1.Caption = "My New Caption"
The problem with that is that if you later give your button a more
meaningful name, that reference will be broken. So there is an
alternative: every control has a 'RegID' property that will 'Reg'ister
that value as an 'ID' with the form. So if you set the button's
RegID="VerticalButton1", you can then refer to it from any object in
that form as 'self.Form.VerticalButton1'
> I noticed in the Object Info Object tree it shows dButton,
> dButton1 .... dButton11 which seems to be an array.
No, it isn't, but I can see why you might think that. It's simply a
tree to help you see the objects as they are nested within the various
sizers and containers in your design.
> 2) Also I would like to disable by making them invisible. Can that
> be done?
Sure: button.Visible = False
-- Ed Leafe
_______________________________________________
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/[EMAIL PROTECTED]