+--------------------------------------------------------------+
| |
+--------------------------------------------------------------+
| +--------+ |
| | Page 1 | |
|-+ +---------------------------------------------------|
| | +- Group ------------------------+|
| # | ||
| lhs pane | | || rhs pane
| | | ||
| | | ||
| +----------------------+ | | ||
| |A control, | | | Editor object ||
| |which properties | | | ||
| |have to be edited | | | ||
| |with the editor in the| | | ||
| |rhs pane | | | ||
| +----------------------+ | | ||
| | +--------------------------------+|
+--------------------------------------------------------------+
When I click on the control within the lhs pane, I want to display the
appropriate editor, which displays the control's properties. To do so I need
the group box in the rhs pane as the editor's parent. Therefore the text
control tells the MainFrame (module variable as a singleton) to display the
right editor. So this path is short.
But now, down the path, I get into troubles: The MainFrame does not know
about the group box in the rhs pane of the active page of the notebook
within the MainFrame. See?
So the path is: MainFrame ---displayEditor()-->
NoteBook ---displayEditor()--> Currently selected page. The nesting down
stops here, because the page knows about the group box within the pane,
because it created them.
I'm in doubt that this is a design pattern issue. I guess it's about
organizing all the controls of a GUI.
Should I create a dict with control name/object pairs, held by the
MainFrame?
Or should the rhs group box a globally accessible singleton or Borg?
Any other hint? How do you handle such situations?
I sketched the app both with wxPython and PMW/Tkinter. Is this what PyQt's
slots are for? Can I connect the lhs control with the rhs group box? It'S
hard for me to see how this would solve the problem, because the distance
between the controls remains. Well, I guess the dict mentioned above is not
the worst here, is it?
Any hint welcome.
Regards
Franz GEIGER 1 1567
On Wed, 2003-08-27 at 12:29, F. GEIGER wrote:
[snip nice diagram] Should I create a dict with control name/object pairs, held by the MainFrame?
This doesn't sound too bad.
Or should the rhs group box a globally accessible singleton or Borg?
Trying to get past my prejudice against the word global to see this
solution objectively and just can't.
Any other hint? How do you handle such situations?
Perhaps by generating a custom event and posting it to the main window?
If you're using wxPython, you might take a look at the dispatcher
module. I haven't used it yet, but it might be appropriate to this sort
of task. Regardless, I'd certainly post to the wxPython user list to
see what people there come up with.
Regards,
Cliff
--
She clings to the nearest passerby, she's lost control again
-Joy Division This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: rzed |
last post by:
Periodically, we see questions about which gui package is best, or
which database package to use. These questions typically trigger
some exchanges of opinion, though of course this no one best
answer, and eventually things quiet down until the next round.
But it seems to me that what seldom gets asked is: why is it
Python's concern which package to use for those purposes? It seems
to me that a proper approach from the viewpoint of the...
|
by: MM |
last post by:
Hi, First off, I'm just beginning .NET and GUI stuff and am very
inexperienced. I have worked through a number of GUI tuts in books but
all the GUI code to handle events for all the controls in these examples
is always in the single file of the main form. What is the correct way
to 'sub-divide' various GUI sections into differnet files? For instance,
with all my anticipated controls, this one file would be hundreds if not
thousands of...
|
by: Macca |
last post by:
Hi,
I am developing an app which i want to have same style of GUI as the .NET
Configuarion tool. i.e menus at top,rest of dialog dialog split into two with
a tree like structure on the left and when item is selected on it, its
contents are displayed on the right hand side.
I'm not sure how to achieve this( maybe using splitter control with treeview)
I'd appreciate any suggestions that could help me do the above
|
by: tshad |
last post by:
Many (if not most) have said that code-behind is best if working in teams -
which does seem logical.
How do you deal with the flow of the work?
I have someone who is good at designing, but know nothing about ASP. He can
build the design of the pages in HTML with tables, labels, textboxes etc.
But then I would need to change them to ASP.net objects and write the code
to make the page work (normally I do this as I go - can't do this...
|
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: 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: 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: 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();...
|
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: 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...
| |