I have a small problem; I would like to have a reasonable
minimum size for a wx.Window.
A simplified version of my code:
s = wx.SplitterWind ow(self, -1)
curves = wx.Notebook(s)
curve = wx.Window(curve s, ID_BLANKCURVE, style=wx.SUNKEN _BORDER,
size=(300,200))
curves.AddPage( curve, "Blank")
textbox = wx.TextCtrl(s, ID_TEXTBOX, style=wx.TE_MUL TILINE,
size=(-1,50))
s.SetMinimumPan eSize(50)
s.SplitHorizont ally(curves, textbox)
s.SetSashGravit y(0.8)
Here 'self' is the main window class, i.e. inherited from wx.Frame.
What I would like to happen is that both the curve area and the
textbox would have an absolute minimum size when moving the
sash or resizing the window.
How to get this behaviour? I have tried setting the minimum sizes
of the curve and the textbox by using the SetMinSize() method,
but this does not seem to affect anything.
Already when the window is shown the upper pane (i.e. the notebook
curves) is smaller than (300,200) set in the code.
TIA,
- Ville
--
Ville Voipio, Dr.Tech., M.Sc. (EE) 2 2058
Ville Voipio wrote: I have a small problem; I would like to have a reasonable minimum size for a wx.Window.
A simplified version of my code:
s = wx.SplitterWind ow(self, -1)
curves = wx.Notebook(s) curve = wx.Window(curve s, ID_BLANKCURVE, style=wx.SUNKEN _BORDER, size=(300,200)) curves.AddPage( curve, "Blank")
textbox = wx.TextCtrl(s, ID_TEXTBOX, style=wx.TE_MUL TILINE, size=(-1,50))
s.SetMinimumPan eSize(50) s.SplitHorizont ally(curves, textbox) s.SetSashGravit y(0.8)
Here 'self' is the main window class, i.e. inherited from wx.Frame.
What I would like to happen is that both the curve area and the textbox would have an absolute minimum size when moving the sash or resizing the window.
How to get this behaviour? I have tried setting the minimum sizes of the curve and the textbox by using the SetMinSize() method, but this does not seem to affect anything.
Already when the window is shown the upper pane (i.e. the notebook curves) is smaller than (300,200) set in the code.
TIA,
- Ville
Couldn't you register for a handler? It would be called on changing size or
on moving the sash's slider. And w/i that handler you could resize the
window to its min dims.
HTH
Franz GEIGER
In article <dg**********@n ews.hispeed.ch> , Franz GEIGER wrote: Couldn't you register for a handler?
Oui, mais...
I can figure out a few ugly workarounds. However, my question is if
there is a nice and clean way to make wxPython set the minimum size.
I'd really hate to start calculating the sizes myself or making
any extra handlers, if the existing infrastructure can handle what
I want.
- Ville
--
Ville Voipio, Dr.Tech., M.Sc. (EE) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nikolai Kirsebom |
last post by:
I've made a small utility which converts the content of a Microsoft
Word2000 document to wxPython code.
For some time I've used wxPython in small projects. I always have to
look up old examples when writing 'sizer' code, and I tend to spend
quite some time before getting it correct.
Some time ago I was going to implement a copy of a MFC based dialog in
wxPython. The MFC dialog did not have dynamic sizing. In order to
identify how the...
|
by: Simon Erikson |
last post by:
Hello:
I would like to build an app consisting of a "root" frame that can
contain an arbitrary number of child frames (the user will click to
create them). Each of these child frames needs the full functionality
of a frame (title,menu,status bars, min,max,close icons, scroll bars,
sizing, moving). In addition, the user must be able to create
grandchild frames within these child frames, to an arbitrary depth (in
practice limited to 10...
|
by: Grant Edwards |
last post by:
Can anybody recommend a good book on wxPython? Are there any
books on wxPython?
I've been trying to learn wxPython and/or wax for a few weeks,
and I'm just not getting it.
wxWindows seems to be more low-level than the other GUI
toolkits I've used (Tk, GTK, and Trestle), and there are all
sorts exposed details in wxWindows/wxPython that I find weird.
|
by: Roger Withnell |
last post by:
I open a new window from the current window to display maps.
Several maps of different sizes can be displayed. The function is given the
size of the map and adjusts the window size accordingly.
If a new window is already open, the new map sizes are ignored and the new
map is is either too small for the existing "new" window or too big, which
is a more serious problem!
I've tried to fix this by closing the new window if it is already...
|
by: Robin Dunn |
last post by:
Announcing
----------
The 2.6.3.2 release of wxPython is now available for download at
http://wxpython.org/download.php. This is a mostly bug fix release
and takes care of several "unfortunate features" discovered in the
2.6.3.0 release made last week. A summary of changes is listed below
and at http://wxpython.org/recentchanges.php.
| |
by: Robin Dunn |
last post by:
Announcing
----------
The 2.6.3.2 release of wxPython is now available for download at
http://wxpython.org/download.php. This is a mostly bug fix release
and takes care of several "unfortunate features" discovered in the
2.6.3.0 release made last week. A summary of changes is listed below
and at http://wxpython.org/recentchanges.php.
|
by: citronelu |
last post by:
Hi,
I'm new to wxpython, and the following code is my first serious
attempt:
#~ start code
import wx
class MyPanel(wx.Panel):
|
by: Andrea Gavana |
last post by:
Hi Diez & All,
Do you mind explaining "why" you find it *buttugly*? I am asking just
out of curiosity, obviously. I am so biased towards wxPython that I
won't make any comment on this thread in particular, but I am curious
to know why some people find it "ugly" or "bad" or whatever. It has
its own bugs and missing features, of course, but it is one of the
major GUI player in the arena, together with PyQt and PyGTK.
|
by: Guilherme Polo |
last post by:
On 10/29/08, Olrik Lenstra <o.lenstra@gmail.comwrote:
It will be a combination of commands, not a single one. Initially I
considered this as "probably without solution", since tcl acquired a
yield command just in the 8.6a3 release, but then I looked at
wx.SafeYield code and apparently it is possible to replicate it.
Here is an initial cut, it is very possible to contain something not
equivalent to wx.SafeYield (besides it could be...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |