Hello
Im having problem, wxTreeCtrl generate 3 x EVT_TREE_SEL_CH ANGED on click
item right button mouse. This problem only win32. Why?
Simple example:
from wxPython.wx import *
class MyApp(wxApp):
def OnInit(self):
frame = wxFrame(NULL, -1, "wxPython",
wxDefaultPositi on,wxSize(200,1 50))
frame.Show(true )
self.nr = 0
self.SetTopWind ow(frame)
self.ID_TREE = wxNewId()
self.tree = wxTreeCtrl(fram e, self.ID_TREE)
root = self.tree.AddRo ot('root test event')
itm = self.tree.Appen dItem(root, 'Right click first item')
itm = self.tree.Appen dItem(root, 'Right click next item')
EVT_TREE_SEL_CH ANGED (self, self.ID_TREE, self.ItemChange d)
return True
def ItemChanged(sel f, event):
self.nr += 1
print self.nr
app = MyApp(0)
app.MainLoop() 1 1722
Krzysztof Kaczkowski <kr*******@py14 2.wroclaw.sdi.t pnet.pl> pisze: Im having problem, wxTreeCtrl generate 3 x EVT_TREE_SEL_CH ANGED on click item right button mouse. This problem only win32. Why?
Maybe you should subscribe wxpython-users list and ask this question
there? I'm pretty sure, that you will find much broader audience than
here. And of course Robin Dunn also subscribes this list...
--
Jarek Zgoda
Registered Linux User #-1 http://www.zgoda.biz/ JID:ja***@jabbe rpl.org http://zgoda.jogger.pl/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brendan |
last post by:
Hello,
I am looking for any pointers on creating a Tree control which can
render html snippets as labels.
On each leaf of the tree I want to show text, but with more formatting
than is allowed with the standard wxTreeCtrl. I have expermented with
wxTreeListCtrl but it does not give the flexibility of html.
Would it be possible to derive from wxTreeCtrl or wxTreeLayout? Or
|
by: Piet |
last post by:
Hi there.
I have a problem when working with a wxTreeCtrl. I would like to
expand all branches of a sepcific position in a tree with a single
command. Since there does not appear to be such a command, I tried to
write my own recursive function. Here is the code snippet:
def OnPopup1(self,event):
item = self.Tree.GetSelection()
self.parent.msgbox(self,self.Tree.GetItemText(item),"Kein
Titel",wxOK)
#self.Tree.Expand(item)
|
by: danielpm72 |
last post by:
Hi,
I want to read a wxTreeCtrl from the root since I want to store all
the information in it in a python dictionary. I know that the methods
I have to use are ItemHasChildren, GetFirstChild and GetNextChild and
I have been success in getting the first node in this manner:
while child.IsOk():
print wx.TreeCtrl.GetItemText ( self, child )
if wx.TreeCtrl.ItemHasChildren ( self, child ):
|
by: Gnaneshwar Babu |
last post by:
Hi
I am facing a problem with extracting event logs of win32 to a file.
Am using the following code to extract eventlogs to file
use Win32::EventLog;
$handle=Win32::EventLog->new("System", $ENV{ComputerName})
or die "Can't open Application EventLog\n";
$handle->GetNumber($recs)
or die "Can't get number of EventLog records\n";
|
by: Manfred Braun |
last post by:
Hi All,
I am trying to fetch system-events, and I am successful
with "TimeChanged", but cannot get "SessionEnding". I am
not an OO expert and so - just to be sure - I made all
my methods public and static, this this does'nt seem
to help.
Could someone plesase help? My code is below:
| |
by: bb |
last post by:
I have a windows network device driver written in c++ and a user
interface im porting to c#, my problem is i dont seem to be getting
notified of the event calls from the driver to the c# app
im using the following code in c# in the UI to create an event
public static IntPtr OpenGrantedPacketEvent()
{
IntPtr objDriver = Driver.OpenDriver();
IntPtr objEvent = Win32.CreateEvent(IntPtr.Zero, false, false,
|
by: Jon |
last post by:
I have a service program that creates a crystal report and prints the report
to a named printer driver. The printer driver raises an event when it is
finished. I am supposed to trap for the following event to determine when I
can continue with my code flow.
Event:
%printername%.mfx.complete
Can anyone help me out with some sample code to loop and wait for this
event? I found one example in C#, but I'm not having much luck getting to...
|
by: mitsura |
last post by:
Hi,
it is possible to change the font (bold, underline, italic) in the text
used in a wxTreeCtrl?
I looked in the wxPython demo but I can't find anything.
Any help much appreciated.
Kris
|
by: eC |
last post by:
I use a tree control in my application and was hoping to use use the
GetItemText method to read the new label of the tree item after the
user has edited it. So in the EVT_TREE_END_LABEL_EDIT event handler,
i call this method but the old label (previous value before the edti)
is returned.
Is there something else i have to do or is this a bug?
|
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: 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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
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...
| |