On Jan 31, 2008 10:33 AM, Ed Leafe <[EMAIL PROTECTED]> wrote:
> On Jan 31, 2008, at 11:22 AM, Paul McNett wrote:
>
> > This function will be
> > evaluated at the proper time by Dabo to dynamically determine the
> > value
> > of the property.
>
>         "At the proper time" == update()
>
>         Let's say you have a form displaying your Customers. It would be cool
> if the form's Caption reflected the currently-selected customer, so to
> do this you would write:
>
> def afterInit(self):
>         self.DynamicCaption = self.getCurrentCustomer
>
> def getCurrentCustomer(self):
>         return "Editing: %s" % self.PrimaryBizobj.Record.cust_name
>
>         Now as you navigate or requery, selecting a record fires the update()
> method, causing all controls to display the current record's values,
> and will also update the form's Caption property with the value
> returned by getCurrentCustomer().
>
>         Other common uses are DynamicEnabled/DynamicVisible that are tied to
> permissions; DynamicBack/ForeColor to highlight items that need
> attention or to display a visual status cue; DynamicHeight/Width/Left/
> Right to control sizing/positioning of an object to reflect some other
> status/condition; ...

The dLed widget is nothing more than a dPanel with drawfunctions that
have dynamic properties set.  It is a good example of using Dynamic
properties.  You can find it in dLed.py

Nate L.


_______________________________________________
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/dabo-users/[EMAIL PROTECTED]

Reply via email to