Ed Leafe wrote:
> On Sep 18, 2009, at 4:05 PM, Jeff Johnson  wrote:
> 
>> Greetings:  I added a panel to the main form  and then an image to the
>> panel.  It "kind of" works.  The  first form comes up funny and any  
>> forms
>> opened  erase the picture in the background.  Here is the code for my
>>  main form and a jpg of what I am seeing.
>>
>> Seems I'm close  but I can't light the cigar yet.
>>
>>  http://www.kj7lo.com/pictures/python/
> 
>     The main  form doesn't seem to be getting Paint events, which would  
> trigger  redraws.  Can you post the code you are using?
> 
>    Another option is to use a dImage. You could add this code to the   
> main form:
> 
> self.img = dabo.ui.dImage(self.mainPanel,  Picture="path/to/image",
>          ScaleMode="Proportional")
> sz = self.mainPanel.Sizer =  dabo.ui.dSizer()
> sz.append1x(self.img)
> 
> 
> -- Ed  Leafe
> 
> 
> 
> 
> 



We get the behavior described by Jeff using dImage. 
 
In fact, we created the form using ClassDesigner as dForm, and then edited  
the cdxml, changing dForm to dFormMain.  We then achieved MDI, but the main 
 form background picture gets "erased" by anything appearing in front of 
it,  including menus. (Running the same form as dForm, the background behaves  
correctly, expanding when the form is expanded, etc.)
 
Here's the cdxml for the converted main form:
 
<?xml version="1.0" encoding="cp1252"  standalone="no"?>
<dFormMain code-ID="dForm-top" Name="RandP"  Caption="Rubin &amp;&amp; 
Poor, Inc." SaveRestorePosition="False"  Top="99" Height="821" Width="968" 
designerClass="DesForm"  Left="276">
<dSizer SlotCount="1" designerClass="LayoutSizer"  Orientation="Vertical">
<dPanel sizerInfo="{'HAlign':  'Left', 'VAlign': 'Top'}"  
designerClass="controlMix">
<dSizer SlotCount="1"  designerClass="LayoutSizer"  Orientation="Vertical">
<dImage  RegID="imgMainSplash"  
Picture="path://..\..\..\..\..\..\..\i:\share\python\dabo\projects\runs2\ui\title.bmp"
  ScaleMode="Clip" 
designerClass="controlMix" sizerInfo="{'VAlign':  'Middle'}"></dImage>
</dSizer>
</dPanel>
</dSizer>
</dFormMain>
 
Jonathan Poor
 
 


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
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]

Reply via email to