473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

wxPython help please

I hope someone can help me with a couple of wxPython questions, or point
me to the right newsgroup for the questions.

I am trying to modify the floatcanvas demo program. I want to load an
image from a file (jpg or whatever), then do a kind of color-picker
action on it.

I haven't tried yet to figure out how to load the file. Just for
starters, when I click on the canvas, I want to get the rgb pixel value
for the point under the cursor. I can't for the life of me figure out
how to do it. I suppose it begins with event.GetPosition(), but after
that I am at a loss.

The larger question is how to use wxPython. It's got such fabulous
stuff, but every time I try to do anything with it, I eventually give up
because I can't find adequate documentation. I know very little about
graphics programming.

Please respond here. Because of spammers, the email address is fake.

Thanks,
"Jive"
Dec 17 '06 #1
4 1402
Try the wxPython mailing list, which you can find on their site. And
the best wxPython reference is the book (also available as an e-book)
by Robin Dunn, who created wxPython. Seeing wxPython from his
perspective is well worth the money. If I recall correctly he devoted
an entire chapter to drawing with a canvas widget.

-Sandra

Dec 17 '06 #2
Sandra-24 wrote:
Try the wxPython mailing list, which you can find on their site. And
the best wxPython reference is the book (also available as an e-book)
by Robin Dunn, who created wxPython. Seeing wxPython from his
perspective is well worth the money. If I recall correctly he devoted
an entire chapter to drawing with a canvas widget.

-Sandra
Thanks. I'll give it a look see.

You understand that what I want to do is get the pixel that's under the
cursor when I click, right? I don't really need to draw things, only
load an image from a file. But since this program already did so much
of what I wanted, I decided to try it. It is frustrating that after a
couple of hours I still can't figure out how to read a danged pixel.

Dec 17 '06 #3
Sandra-24 wrote:
Try the wxPython mailing list, which you can find on their site. And
the best wxPython reference is the book (also available as an e-book)
by Robin Dunn, who created wxPython. Seeing wxPython from his
perspective is well worth the money. If I recall correctly he devoted
an entire chapter to drawing with a canvas widget.

-Sandra

I bought the ebook. Searching for "pixel", all I came up with was a
method called GetPixel in a "device context." I know there must be a
device context buried in there somewhere, so now I need to winkle it out.
Dec 17 '06 #4
On Dec 16, 8:43 pm, Jive Dadson <notonthe...@noisp.comwrote:
>I bought the ebook. Searching for "pixel", all I came up with was a
method called GetPixel in a "device context." I know there must be a
device context buried in there somewhere, so now I need to winkle it out.
You are right that you need to capture the mouse down event for the
canvas and get the cursor position from there. To get the rgb value for
that pixel may require the dc, I don't remember enough about them to
say for sure. You might have better luck on the mailing list, it's a
high volume list and you'll likely get a good response there.

-Sandra

Dec 17 '06 #5

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

Similar topics

3
by: Robert | last post by:
Hello list, could somebody point me to a good reference about wxPython event handling? I have seen many examples but which one is the best. Waht are the advantages and disadvantages? Can you...
15
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...
15
by: Polerio Babao Jr.II | last post by:
Please correct me if im wrong. I have depended much on python and wxpython gui apps. After a year of using python apps I was able to do good application written entirely in python. One big problem...
1
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...
1
by: James Stroud | last post by:
Hello All, I will soon have an excuse to install a new operating system on my computer. I would like to know exactly what operating system I should have so that I can get wxPython going....
4
by: jojoba | last post by:
HI I wrote a little wxpython program with an embedded windows media player. It worked great. Recently, I reinstalled windows and then wxpython (most likely a newer version than i had before). Now...
7
by: krishnakant Mane | last post by:
hello all. finally I got the accessibility issue out from wxpython. actually almost got it out, but that's another story. now my problem is that I can't gind a downloadable version of wxpython...
4
by: 7stud | last post by:
Hi, I'm using an intel imac which came with python 2.3.5 pre-intstalled on OS 10.4.7. I was able run a hello world wxPython script in Terminal by typing: $pythonw wxPythonTest.py ...
8
by: Sean DiZazzo | last post by:
Is there something special you have to do to get a wxPython app to run remotely under xwindows? My Tkinter apps always automatically work that way, so I was surprised to even be confronted with...
5
by: blaine | last post by:
The wxPython group is a bit stale compared to this group, so I'll give it a shot :) (READ: Originally when I started htis post, Python 2.5 at the shell did not work (identical behavior to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
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...

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.