All working now! A nice solution thanks Ed!
Rodgy
----- Original Message -----
From: "Roger Lovelock" <[email protected]>
To: "Dabo Users list" <[email protected]>
Sent: Saturday, January 31, 2009 3:31 PM
Subject: Fw: [dabo-users] List Controls
> Please ignore the previous email (below) - I copied my code from when the
> dListBox was on my main form - of course the new location for this control
> is relative to the floating panel - therefore Top and Left values of zero
> fixed my 'visibility problem. Now I am working on the position of the
> floating panel.
> Rodgy
> ----- Original Message -----
> From: "Roger Lovelock" <[email protected]>
> To: "Dabo Users list" <[email protected]>
> Sent: Saturday, January 31, 2009 2:54 PM
> Subject: Re: [dabo-users] List Controls
>
>
>> Having real problems getting the floating panel to be the right size and
>> position! If I don't do anything in this regard everything works fine,
>> but I have a large floating panel with my drop down list in one corner. I
>> tried the following code to make the panel the size I needed:-
>>
>> class DDLPanel(dPanel):
>>
>> def afterInit(self):
>> codes, keys = self.Parent.Parent.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)
>> wd, ht = self.AccountCodeDDL.Size
>> self.Size = (wd+10, ht+10)
>> self.Position = (5,5)
>> self.Parent.Visible = True
>> self.AccountCodeDDL.Visible = True
>>
>> def codeDDLClick(self, evt):
>> self.Parent.Parent.PrimaryBizobj.moveToPK(self.AccountCodeDDL.Value)
>> self.Parent.Parent.update()
>> self.hide()
>>
>> Now I get a nicely sized panel - but the drop down list does not appear
>> on it. I have a feeling that the larger panel may still be there, but I
>> am showing only part of it and my dropdown list is on the part that is
>> not showing - any clues please?
>> Rodgy
>> ----- Original Message -----
>> From: "Roger Lovelock" <[email protected]>
>> To: "Dabo Users list" <[email protected]>
>> Sent: Saturday, January 31, 2009 2:13 PM
>> Subject: Re: [dabo-users] List Controls
>>
>>
>>> 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/c3f2b50af55a430c93f57058636de...@roger