Well, there's no magic here. I would probably do it by brute force,
creating a window with bunch of buttons, and connect the button handlers
to my keystroke events.
Some of the operating systems already have onscreen keyboards when you
use their touch extensions. What system are you writing for, and what
is the use case?
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
I am going to write a French keyboard too for Linux, because the
keyboard on Gnome does not work very well !...
--
Hugues JEAN-BAPTISTE (h...@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)
wx.MessageBox("Message", "Title", wx.YES_NO | wx.ICON_QUESTION)
produces a message box with the "No" button on the left, and to be
consistent with the rest of my application I would prefer it on the
right. I've tinkered with the style and tried wx.OK | wx.CANCEL hoping
it would give me the "OK" button on the left, but it doesn't.
Just checking if there's a simple solution without having to write my
own class. Cheers.
Duncan
Python 2.6, Ubuntu 9.10, wxPython 2.6.
No, and in general you should not TRY to do so.
In Windows, wx.MessageBox calls the operating system's MessageBox API.
The MessageBox API displays those buttons in an order dictated by the
Microsoft Windows User Interface Guidelines, a book that reflects the
tens of hours of user interface research Microsoft has done over the
years, and which used to be required reading for application
developers. Users expect the buttons to be in the order you see.
Now that you've had the requisite scolding, it's pretty darned easy to
create your own MessageBox class. Or, check the wx.MessageDialog class.
Thanks, I wasn't aware of that. On Windows I get the button order I was
wanting, and that's the platform most of the users will be on. I've
changed the sizers on my other dialogs to wx.StdDialogButtonSizer
instances to get consistency within each platform, despite my personal
preference for 'Yes' to the left of 'No'. Only issue now is figuring
out why the buttons aren't centre-justified on XP. Cheers.
Duncan
I might be wrong but I imagine that these details could change the
decisions you make dramatically.
Are you trying to recruit some of the available mobility in patients
to provide greater autonomy?
What kind of mobility? What kind of interface are you planning to use
with the patients?
As for being new to Python and wxPython, I envy you... :) you have so
many wonderful things to learn in front of you.
Peter
On Tue, Mar 29, 2011 at 6:26 AM, Ping <a222...@yahoo.com.tw> wrote:
> We are a bunch of college students trying to develop a cross-platform
> application which may assist the the ALS (Amyotrophic Lateral
> Sclerosis) patients in using computers. The application include the
> screen mouse and keyboard. As we are very new to Python and wxPython,
> lots of things are there for us to learn.
--
There is NO FATE, we are the creators.
blog: http://damoc.ro/
Duncan
Duncan
self.GetGridRowLabelWindow().Bind(wx.EVT_MOTION,self.onMouseOverRowLabel)
def onMouseOverRowLabel(self, event):
x = event.GetX()
y = event.GetY()
row = self.YToRow(y)
win = self.GetGridRowLabelWindow()
win.SetToolTipString(self.GetRowLabelValue(row))
event.Skip()
We don't have much (if any) control over how and where tooltips are
shown, but perhaps if you set the tooltip to "" first, and then reset it
to the new value (perhaps via CallAfter) then it will make a difference.
(BTW, you should probably be optimizing your code to only set the
tooltip value if the event is happening over a different row than where
it was shown the last time, otherwise you are setting the same value
many times as the mouse moves over the same cell.)
If that doesn't work then you could always use wx.TipWindow and show a
tooltip-like window yourself.
--
Robin Dunn
Software Craftsman
http://wxPython.org
Thanks. That might be my next port of call. Resetting the tooltip made
no difference and a wx.TipWindow was less responsive and caused my
application to crash in a fairly unpredictable way (and taking down IDLE
without providing a traceback). Possibly my fault, but I haven't really
got the time to investigate. Cheers.
Duncan
Hi,
if I understand correctly and you are running the code for a wx app
from within Idle, you are likely to get unpredictable errors anyway,
as wx and tkinter somehow interfere with each other imn such casees.
for emulating (simplyfied) toolstips, I was quite happy with using
wx.PopupWindow with a static text in it; you can check the rough
sample:
http://groups.google.com/group/wxpython-users/msg/39c3de5c8a8923e7
(The most complicated part deals with aui, the usage of PopupWindow
itself is rather straightforward.)
regards,
vbr
That was just in an attempt to get a traceback. I'm actually using Boa
Constructor.
> for emulating (simplyfied) toolstips, I was quite happy with using
> wx.PopupWindow with a static text in it; you can check the rough
> sample:
>
> http://groups.google.com/group/wxpython-users/msg/39c3de5c8a8923e7
>
Thanks, I'll check it out.
Duncan
Duncan
One workable but low-tech solution used by many web sites is to add the
string "----------------" where you want the separator.
You could use a RadioBox to allow the user to select which type of item
to select, and then refill the combo with the items of that type.