Managed to work out that I needed the bizobj from the parent of the parent
!!! Now dispalying data OK - just working on the aesthetics of the soize and
position of the floating panel.
Rodgy
----- Original Message -----
From: "Roger Lovelock" <[email protected]>
To: "Dabo Users list" <[email protected]>
Sent: Saturday, January 31, 2009 1:35 PM
Subject: Re: [dabo-users] List Controls
> Hi,
> Trying out the floating panel - found the dDateTextBox somewhat complex -
> so tried to simplify to my context as follows ...
> ..........
> import dabo.ui.uiwx.dPanel as dPanel
>
> class DDLPanel(dPanel):
>
> def afterInit(self):
> codes, keys = self.PrimaryBizobj.getAccountCodes()
> self.AccountCodeDDL = dabo.ui.dListBox(self, Width=60, Height=200,
> Left=250, Top=25, ValueMode="Key", Choices = codes, Keys = keys,
> OnHit=self.codeDDLClick)
> self.Visible = True
>
>
> def codeDDLClick(self, evt):
> self.PrimaryBizobj.moveToPK(self.AccountCodeDDL.Value)
> self.update()
> self.AccountCodeDDL.Value = None
> self.Form.hide()
>
> class AccountsForm(LBooksBaseForm):
> def afterInit(self):
> self.super() etc etc etc
>
> My button on the form is working OK, but I seem to be having trouble
> referencing the Bizobj to load the dListBox (and I imagine I'll have the
> same problem updating my form with the data from the selected record). Do
> I need to pass some sort of reference to the Bizobj when my Lookup button
> is clicked?
>
> Thanks
> Rodgy
> ----- Original Message -----
> From: "Ed Leafe" <[email protected]>
> To: "Dabo Users list" <[email protected]>
> Sent: Saturday, January 31, 2009 11:59 AM
> Subject: Re: [dabo-users] List Controls
>
>
>> On Jan 30, 2009, at 6:48 PM, Roger Lovelock wrote:
>>
>>> I guess what I was after was a dListBox that was 'drop down'. The
>>> main idea
>>> was to not use up too much scrren real-estate unless a selection was
>>> being
>>> made - ie I'd really like the drop down to go over the top of other
>>> controls
>>> (just like a dDropdownList). I had thoughts of using a button which
>>> when
>>> clicked would make a dListBox visible over the top of the button
>>> (and any
>>> other controls in the area), and then to make the dListBox invisible
>>> again
>>> once a selection had been made, but there seem to be issues with any
>>> other
>>> controls in the same area of the form going over the top of the
>>> dListBox.
>>
>>
>> Dabo forms have a 'FloatingPanel' to which you can add your controls
>> and show/hide as needed. It's what is used for dDateTextBox in order
>> to pop up a calendar when the user requests. Take a look at the code
>> in that file and if it isn't clear how to use it, post questions here.
>>
>>
>> -- Ed Leafe
>>
>>
>>
>>
[excessive quoting removed by server]
_______________________________________________
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/47c27c9d2a0a417896f94f1d52a46...@roger