Hi, my personal battle with wxPython continues
I want a ScrolledWindow inside a (500, 250) Frame, and I want it to be
*always* (1728, 1146). The Frame should be resizable.
The code in attachement doesn't display the ScrolledWindow, and after
opening an Image it disappears.
Every suggestion is really appreciated, I don't have the slightest idea
of what I'm doing
聽聽ngw
路路路
--
checking for life_signs in -lKenny... no
聽聽Oh my god, make (1) killed Kenny ! You, bastards !
nicholas_wieland-at-yahoo-dot-it
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
Nicholas Wieland wrote:
Hi, my personal battle with wxPython continues
I want a ScrolledWindow inside a (500, 250) Frame, and I want it to be
*always* (1728, 1146).
Use SetSizeHints.
The code in attachement
I didn't get an attachment, please try again.
-Chris
路路路
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
Chris Barker wrote:
I want a ScrolledWindow inside a (500, 250) Frame, and I want it to be
*always* (1728, 1146).
Use SetSizeHints.
oops, I think I misunderstood. SetSizeHints can be used to set the size of a wx.Window, but given that you said you want your scrolledWindow larger than the Frame, you must have meant it's Virtual size.
Look at the demo, but I think the Virtual size is set by:
SetScrollbars(self, pixelsPerUnitX, pixelsPerUnitY, noUnitsX, noUnitsY, xPos, yPos, noRefresh)
Your size will be (pixelsPerUnitX times noUnitsX), (pixelsPerUnitY times noUnitsY)
-Chris
路路路
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
Chris Barker <Chris.Barker <at> noaa.gov> writes:
Chris Barker wrote:
>> I want a ScrolledWindow inside a (500, 250) Frame, and I want it to be
>> *always* (1728, 1146).
>
> Use SetSizeHints.
oops, I think I misunderstood. SetSizeHints can be used to set the size
of a wx.Window, but given that you said you want your scrolledWindow
larger than the Frame, you must have meant it's Virtual size.
Look at the demo, but I think the Virtual size is set by:
You can use SetVirtualSizeHints.
From the docs:
wxWindow::SetVirtualSizeHints
virtual void SetVirtualSizeHints(int minW,int minH, int maxW=-1, int maxH=-1)
void SetVirtualSizeHints(const wxSize& minSize=wxDefaultSize, const wxSize&
maxSize=wxDefaultSize)
Allows specification of minimum and maximum virtual window sizes. If a pair of
values is not set (or set to -1), the default values will be used.
Parameters:
minW: Specifies the minimum width allowable.
minH: Specifies the minimum height allowable.
maxW: Specifies the maximum width allowable.
maxH: Specifies the maximum height allowable.
minSize: Minimum size.
maxSize: Maximum size.
Remarks:
If this function is called, the user will not be able to size the virtual area
of the window outside the given bounds.