Heres my code so far (from the bottom of the afterInit on my form :-
self.AccountLookupbtn = dabo.ui.dButton(self.basePanel, Left=184,
Top=78, Width=40,
Caption="Lookup",OnHit=self.DDLPanel)
def DDLPanel(self, evt):
self.fp = self.FloatingPanel
# Can use floating panel owner property to set position here)
left, top = self.Position
self.fp.Position = (left+184,top+78)
codes, keys = self.PrimaryBizobj.getAccountCodes()
self.AccountCodeDDL = dabo.ui.dListBox(self.fp, Width=60, Height=200,
Left=0, Top=0, ValueMode="Key", Choices = codes, Keys = keys,
OnHit=self.DDLClick)
wd, ht = self.AccountCodeDDL.Size
self.fp.Size = (wd, ht)
self.fp.Visible = True
self.AccountCodeDDL.Visible = True
return
def DDLClick(self, evt):
self.PrimaryBizobj.moveToPK(self.AccountCodeDDL.Value)
self.update()
self.AccountCodeDDL.release()
self.fp.release()
Everything works fine except I am having difficulty working out how to
destroy (or hide) the panel - tried a LostFocus event so that I could click
anywhere else on the form, but the floating panel immediately it was
created - as if the panel lost focus as soon as it was created - if the
panel does not have the focus does that mean a keydown wouldn't work as
well? Also - have not been able to find anything in dabodoc for the Owner
property of a panel - can you give me a pointer.
Thanks
Rodgy
_______________________________________________
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/74676a7310044404944004448afa0...@roger