Hi all,
Perplexed by this. I thought the sticky option was supposed to
accomplish this task, but it doesn't seem to be working. Here is what
I'm trying to accomplish.
Window
----------------------------
| --Beginning of group--
| Cell1 Cell2 Cell3
| Cell4 Cell5 Cell6
| -- End of group --
|
| --Beginning of group--
| Cell7 Cell8 Cell9
| Cell10 Cell11 Cell12
| -- End of group --
-----------------------------
Instead, here's what I'm getting:
----------------------------
| --Beginning of group--
| Cell1 Cell2 Cell3
| Cell4 Cell5 Cell6
| -- End of group --
|
| --Beginning of group--
| Cell7 Cell8 Cell9
| Cell10Cell11Cel l12
| -- End of group --
-----------------------------
The cells in the top group are larger and take up more space;
therefore the cells below do not align correctly. I would like them to
all line up like they were in an spreadsheet. I want them in different
groups because they are in different categories, and I'm using the
group boundary as a separator.
Here is my code:
#### Insert options for Support Services
ssGroup = Pmw.Group(self. configScreen, tag_text="Suppo rt
Services", tag_foreground= 'dark green')
## Insert Title
Label( ssGroup.interio r() , text='Part Number', font=('MS',
10, 'bold') ).grid(row=0, col=0, sticky=W, padx=0 )
Label( ssGroup.interio r(), text='Descripti on', font=('MS', 10,
'bold') ).grid(row=0, col=1, sticky=W, padx=2 )
Label( ssGroup.interio r(), text='Quantity' , font=('MS', 10,
'bold') ).grid(row=0, col=2, sticky=W, padx=0 )
x = 1
self.e = IntVar()
for part, list in info.masterList .items():
setattr( self.e, part, IntVar() )
for part, list in info.masterList .items():
print part
if list[5] == "ss":
Label( ssGroup.interio r() , text=part ).grid(row=x,
col=0, sticky=W, padx=0 )
Label( ssGroup.interio r(), text=list[0] ).grid(row=x,
col=1, sticky=W, padx=2 )
Entry( ssGroup.interio r(), width=3, textvariable =
getattr(self.e, part),
text='0').grid( row=x, col=2, sticky=W, padx=4 )
e = getattr(self.e, part)
e.set(0)
x += 1
ssGroup.pack(ex pand=1, fill=X, ipady=5)
#### Insert options for Professional Services
psGroup = Pmw.Group(self. configScreen, tag_text="Profe ssional
Services", tag_foreground= 'dark green')
## Insert Title
Label( psGroup.interio r() , text='Part Number', font=('MS',
10, 'bold') ).grid(row=0, col=0, sticky=EW, padx=0 )
Label( psGroup.interio r(), text='Descripti on', font=('MS', 10,
'bold') ).grid(row=0, col=1, sticky=EW, padx=2 )
Label( psGroup.interio r(), text='Quantity' , font=('MS', 10,
'bold') ).grid(row=0, col=2, sticky=EW, padx=0 )
x = 1
for part, list in info.masterList .items():
print part
if list[5] == "ps":
Label( psGroup.interio r() , text=part ).grid(row=x,
col=0, sticky=EW, padx=0 )
Label( psGroup.interio r(), text=list[0] ).grid(row=x,
col=1, sticky=EW, padx=2 )
Entry( psGroup.interio r(), width=3, textvariable =
getattr(self.e, part),
text='0').grid( row=x, col=2, sticky=EW, padx=4
)
e = getattr(self.e, part)
e.set(0)
x += 1
psGroup.pack(ex pand=1, fill=X, ipady=5)
The bottom group properly expands to take up the available space left
over from the larger top group. I thought that the sticky option was
supposed to make the cells expand, but it doesn't appear to do so in
this case. How do I force the grid cells to expand also?
Thanks ahead of time,
Marc 0 1804 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Gary Richardson |
last post by:
Is there a simple way of causing the size of a canvas to change as the
window is resized when using the Grid geometry manager? Setting
sticky='NESW', as in the following code, doesn't work though the
documentation for Grid seems to imply that it should: "sticky If a
slave's cell is larger than its requested dimensions, this option may be
used to position (or stretch) the slave within its cell. ... The sticky
option subsumes the...
|
by: dchow |
last post by:
Our database size is currently 4G and is incrementing at a rate of
45M/day. What is the max size of a SQL database? And what is the
size beyond which the server performance will start to go down?
|
by: Geoff Soper |
last post by:
I would like to arrange some photos in a simple grid. Each photo is either x
pixels by y pixels or y pixels by x pixels (i.e. all the same size, arranged
either in the landscape or portrait direction). I want each row to be the
same width and height, the largest dimension of x and y. I want this to be
the case even if all the photos in a given row or column are arranged in the
'other' direction, the one which leaves two strips of empty...
|
by: Jan Mueller |
last post by:
Hi all,
I don't know whether this is the right group, let me know :-). I tried
to open this XML file (with internal DTD) with XMLSpy 2005. I guess some
of you also use this tool.
http://dret.net/lectures/xml/a/4/wwww.xml
I'm quite new to XML at all, so I wondered about the following. Maybe
someone can tell me whether this is correct or it's an XMLSpy bug:
|
by: phil-news-nospam |
last post by:
Is there really any advantage to using DIV elements with float style
properies, vs. the old method of TABLE and TR and TD?
I'm finding that by using DIV, it still involves the same number of
elements in the HTML to get everything just right. When you consider
the class attribute on the DIV elements, there's not much size savings
anymore for using DIV.
There are other disadvantages to not using TABLE/TR/TD, such as the
lack of ability...
| |
by: shaanxxx |
last post by:
I have code which says
#define MYBOOL int
This code is very old. people who have written is not avaible. I was
thinking what could be reason.
1) bool datatype was not available that time (10 years back: correct me
if i am wrong)
2) int was word aligned (16bit and 32bit). Writter of above code doesnt
want to give choice to compiler.
|
by: JoeC |
last post by:
I am writing a game and I am having a challenge with my combat
function. All I want to do is find out how to group pieces that are in
the same space. There are two sides and all the units that are in the
same space fight. I want to add up the attack factors and defending
factors in the same space then figure out the odds so I can roll
against an odds table. Basically each piece holds its own x and y loc.
Here is what I have right...
|
by: =?ISO-8859-1?Q?Marco_K=F6rner?= |
last post by:
Hello,
I'm working on mapping the car's environment by updating an occupancy
grid. An occupancy grid dicretizes the 3D space in small grid elements
(voxels). A grid element contains informations about the space it's
representing.
I need to map a space of the dimensions 50m * 5m * 3m with grid
elements of size 1cm * 1cm * cm (= 750 000 000 grid elements).
|
by: dorandoran |
last post by:
I used this article (http://www.codeproject.com/KB/webforms/EditNestedGridView.aspx) to accomplish expand/collaspe grid. I also added a search and it works. but i need to be now automatically expand the corresponded grid where search was found.
User has to click on all the parent grid to find out which child grid has records. How can I automatically expand the grid where there are results?
I probably need a function like below ExpandAll()...
|
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: 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: 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...
|
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...
|
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.
| |
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...
| |