473,698 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Allingn controls wxPython

Hy. I need help. I'm using BoxSizer and i put TextCtrl and StaticText
next to each other and they gor alligned by top of TextCtrl and it looks
terrible. How can i make thm to be alligned by center of each controll.

Thnaks!
Dec 15 '07 #1
2 1321
On Dec 15, 10:14 pm, SMALLp <po...@email. t-com.hrwrote:
Hy. I need help. I'm using BoxSizer and i put TextCtrl and StaticText
next to each other and they gor alligned by top of TextCtrl and it looks
terrible. How can i make thm to be alligned by center of each controll.

Thnaks!
Use the flag wx.ALIGN_CENTRE _VERTICAL when adding the controls to the
sizer.

If you have a number of StaticText/TextCtrl pairs, and you want them
to line up underneath each other, use a FlexGridSizer or a
GridBagSizer.

Frank Millman
Dec 16 '07 #2
On Dec 15, 2:14 pm, SMALLp <po...@email. t-com.hrwrote:
Hy. I need help. I'm using BoxSizer and i put TextCtrl and StaticText
next to each other and they gor alligned by top of TextCtrl and it looks
terrible. How can i make thm to be alligned by center of each controll.

Thnaks!
A shortcut flag is to just use wx.CENTER. You might find this wiki
entry useful:

http://wiki.wxpython.org/UsingSizers

This article may be fruitful as well:

http://www.devshed.com/c/a/Python/A-...thon-Controls/

I personally use the wxPython in Action book by Dunn quite a bit. It's
got lots of information, although it's not well organized.

Mike
Dec 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2136
by: Jim Shady | last post by:
Hi, I am looking at the feasibility in using wxPython on a project our company needs. I intend to show a bar graph in a frame. I can either generate an image and show it in a panel, or maybe draw it on a canvas (?). Either case, the vital feature that we need is the ability to choose parts of the bar by clicking and dragging on it. The selected portion will then be zoomed into again by the software, generating a new bar graph.
0
1030
by: Juan Huertas | last post by:
It's possible to embeed OCX controls using win32com and this work fine. But: How it is possible to assign properties at dessing time (not accesibles at run time) to the OCX objects? In Visual Basic, for example, this is ease using dialogs asociated at desing time, in IE using parameters clause (PARAM NAME an VALUE) to define the embeeded object, etc.
7
11899
by: SeeBelow | last post by:
Do many people think that wxPython should replace Tkinter? Is this likely to happen? I ask because I have just started learning Tkinter, and I wonder if I should abandon it in favor of wxPython. Mitchell Timin -- "Many are stubborn in pursuit of the path they have chosen, few in
0
1171
by: Dave Williams | last post by:
Hi, I'm having problems getting IpAddrCtrl working with a frame containing nested sizers generated from an xrc file. Firstly I tried adding it using AttachUnknownControl as per the example code Using XMLResources on the wxPython wiki. This renders but does not size correctly despite my trying many different variations. Because of my nested sizers I also seem to have to SetSizeHints etc at a higher level than in the example. Also I note...
25
3348
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard Python GUI toolkit is that Tkinter was there first." - Guido van Rossum Guess, that answers my question, but isn't "Tkinter was there first" a very bad answer? :) It is kinda ugly too, so I wonder why it can't be replaced? Or maybe another GUI...
1
2564
by: timothy.williams | last post by:
I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 machine. I have python in a non-standard place, but I'm using --prefix with the configure script to point to where I have everything. The make install in $WXDIR seemed to go fine. I have the libxw* libraries in my lib/ directory libwx_base-2.5.so@ libwx_gtk_adv-2.5.so.3.0.0* libwx_base-2.5.so.3@ libwx_gtk_core-2.5.so@
25
4273
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK on Windows "(...) > can i use pyGTK under > Windows???
0
1024
by: Leo Lee | last post by:
Hi, I think I have already solved this problem while I am digging into the installation sources. I found this: C:\Python25\Lib\site-packages\py2exe\samples\singlefile\gui\setup.py # Requires wxPython. This sample demonstrates: # # - single file exe using wxPython as GUI.
3
1038
by: azrael | last post by:
I need to implement a tree which will append a root. Any other node in the tree will be triggered when a button is pressed. I created the button, all the needed events, tree and a root. But when I want to append a node pressing the button I don't know How. My idea is using the wx.EVT_TREE_SEL_CHANGED event somehow get The ID or something of the selected node, so I could know Where to append the his child. I need the ID for the appenditem...
0
8671
marktang
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...
0
8856
tracyyun
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...
0
7709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
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...
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.