hello everbody. it's the first time i post and my english isn't so good, so
be indulgent.
i'm trying to get rid of the column and row label. Set them to invisible if
it's possible.
I'm working on a project where i have to simulate a mobile phone touch
screen. the idea is to get the position where the user clicked on the
screen. i wanted to represent the screen by a grid where every cell
represent a pixel. i've been able to implement a cell hittest but i cant get
rid of the column an row label.
if somebody have an idea or if u can advise me with an other way than using
a grid , he will save my week
···
--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Wx-grid-without-column-Label-and-row-labl-invisible-tp4406055p4406055.html
Sent from the wxPython-users mailing list archive at Nabble.com.
hello everybody. it's the first time i post and my english isn't so good, so
be indulgent.
your english is fine -- much better than my [any language other than english]!
I'm working on a project where i have to simulate a mobile phone touch
screen. the idea is to get the position where the user clicked on the
screen. i wanted to represent the screen by a grid where every cell
represent a pixel. i've been able to implement a cell hittest but i cant get
rid of the column an row label.
if somebody have an idea or if u can advise me with an other way than using
a grid , he will save my week
If I understand your use-case, I wouldn't use a grid for this at all.
You can simple create a subclass of wx.Panel, and bind the Mouse events to handlers that get the pixel position of the mouse event, and do what you need from there.
I've enclosed a simple sample for you.
-Chris
TestEvents.py (1.4 KB)
···
On 5/18/11 2:50 AM, the_little_big_man wrote:
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
thank you very much Christopher. i had already abandoned the grid idea. with
your sample, i think i can manage to do something ^^
···
--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Wx-grid-without-column-Label-and-row-labl-invisible-tp4406055p4408985.html
Sent from the wxPython-users mailing list archive at Nabble.com.
thank you very much Christopher.
you're welcome.
i had already abandoned the grid idea. with
your sample, i think i can manage to do something ^^
I'm guessing you'll want to draw stuff to that panel, not just capture mouse clicks, so be sure to check the WIki:
http://wiki.wxpython.org/
If you do a title search for "drawing" you'll find some helpful pages.
-Chris
···
On 5/19/11 12:34 AM, the_little_big_man wrote:
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov