Re: [PythonCE] PythonCE on Smartphone (WM6)

2008-02-15 Thread tracer

Hi,

You can use something like this:

mainw=Tk()
mainw.bind_all(Down, lambda e : mainw.event_generate(Tab))
mainw.bind_all(Up, lambda e : mainw.event_generate(Shift-Tab))
mainw.bind_all(Return, lambda e : mainw.event_generate(space))

It works fine on my WM6 smartphone


Jorgen Bodde-3 wrote:
 
 Hi All,
 
 I have PythonCE 2.5 and TKinter running on my smartphone. I wrote a
 minimal app and I see a dialog with a button, but since it is a
 smartphone which does only have number keys and a jog dial to control
 the input, the window stays unresponsive to input. I cannot even set
 the focus to a control.
 
 Is there anything I need to do to get it to redirect the number keys
 and make it focus a control?
 
 Regards,
 - Jorgen
 

-- 
View this message in context: 
http://www.nabble.com/PythonCE-on-Smartphone-%28WM6%29-tp13218053p15499042.html
Sent from the Python - pythonce mailing list archive at Nabble.com.

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


[PythonCE] PythonCE on Smartphone (WM6)

2007-10-18 Thread Alexandre Delattre
Hi,

I' am about to make a public release of PocketPyGui, an open source 
toolkit that provides an abstraction level over the raw Win32 GUI api.
I tried to design its API for python developers with no prior knowledge 
of win32 programming.

For instance, one of its main benefit over its ancestor, vensterce, is 
the transparent event handling that allow direct binding from signals 
(button pressed, list selection changed, ...) to callbacks (any python 
function that takes a single argument). Doing the same with VensterCE, 
would need to understand well about the C way to do message dispatching, 
handling, and would in some cases need to manually maintain a list of ID 
for each controls which is quite static and unpythonic.

The API also covers many controls : Button, Edit, Label, List (ListBox), 
Combo, Table (ListCtrl in report mode), Tree (TreeView), NoteBook, 
Progress (TrackBar), HTML, Date  Time control, Dialog, Font, ... I 
tried to give each control a complete and intuitive interface, making 
use of property and special methods where appropriate. Some controls 
(Canvas  ScrolledFrame) are still in WIP but will be included as a 
demo/tutorial.

As a bonus, ppygui implements dynamic resolution detection and scaling 
(meaning your app will appear the same on a hires or classic resolution 
device without thinking about it), and automatic tab/jog-dial traversal 
(but it can be explicitely deactivated for a Window).

All that to say that, even if I don't own a Smartphone, I'm definitely 
willing to make this kind of GUI abstraction for the next releases. Will 
setup the smartphone emulator provided by MS for my tests ...

Best regards,
Alexandre



___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PythonCE on Smartphone (WM6)

2007-10-18 Thread Jorgen Bodde
Hi Alexandre,

It sounds very interesting. If you have a download available, please
send me (or the mailinglist) a link! I'm still a newbie on the
PythonCE platform, but I do know Python well for 2 years now so I hope
I can use it to develop small apps rapidly for my mobile phone.

Regards,
- Jorgen

On 10/18/07, Alexandre Delattre [EMAIL PROTECTED] wrote:
 Hi,

 I' am about to make a public release of PocketPyGui, an open source
 toolkit that provides an abstraction level over the raw Win32 GUI api.
 I tried to design its API for python developers with no prior knowledge
 of win32 programming.

 For instance, one of its main benefit over its ancestor, vensterce, is
 the transparent event handling that allow direct binding from signals
 (button pressed, list selection changed, ...) to callbacks (any python
 function that takes a single argument). Doing the same with VensterCE,
 would need to understand well about the C way to do message dispatching,
 handling, and would in some cases need to manually maintain a list of ID
 for each controls which is quite static and unpythonic.

 The API also covers many controls : Button, Edit, Label, List (ListBox),
 Combo, Table (ListCtrl in report mode), Tree (TreeView), NoteBook,
 Progress (TrackBar), HTML, Date  Time control, Dialog, Font, ... I
 tried to give each control a complete and intuitive interface, making
 use of property and special methods where appropriate. Some controls
 (Canvas  ScrolledFrame) are still in WIP but will be included as a
 demo/tutorial.

 As a bonus, ppygui implements dynamic resolution detection and scaling
 (meaning your app will appear the same on a hires or classic resolution
 device without thinking about it), and automatic tab/jog-dial traversal
 (but it can be explicitely deactivated for a Window).

 All that to say that, even if I don't own a Smartphone, I'm definitely
 willing to make this kind of GUI abstraction for the next releases. Will
 setup the smartphone emulator provided by MS for my tests ...

 Best regards,
 Alexandre



 ___
 PythonCE mailing list
 PythonCE@python.org
 http://mail.python.org/mailman/listinfo/pythonce

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PythonCE on Smartphone (WM6)

2007-10-17 Thread Christopher Fairbairn
Hi Jorgen,

On 17/10/2007, at 7:29 AM, Jorgen Bodde wrote:
 Thank you for your answer, I guess I need to find a port of wxWidgets
 / wxPython or some kind that targets the mobile platform better, or
 instead use the Embedded Visual Studio with .NET. I love Python so I
 hope there is a better alternative for the smartphone.

I personally have been using vensterce (http://sourceforge.net/ 
projects/vensterce) as my GUI toolkit.

It is a very thin wrapper over top of the Win32 GUI APIs provided by  
the operating system. This coupled with some of the API documentation  
that explains how to create spinbox style lists and expandable edit  
controls (http://msdn2.microsoft.com/en-us/library/ms832344.aspx)  
works reasonably well for me.

However even this vensterce (out of the box) doesn't abstract these  
kinds of UI differences. It is something I am contemplating  
contributing to the vensterce project at some stage...

Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PythonCE on Smartphone (WM6)

2007-10-16 Thread Jorgen Bodde
Hi Christopher,

Thank you for your answer, I guess I need to find a port of wxWidgets
/ wxPython or some kind that targets the mobile platform better, or
instead use the Embedded Visual Studio with .NET. I love Python so I
hope there is a better alternative for the smartphone.

Regards,
- Jorgen

On 10/15/07, Christopher Fairbairn [EMAIL PROTECTED] wrote:
 Hi Jorgen,

 On Tue Oct 16  5:37 , Jorgen Bodde  sent:
 I have PythonCE 2.5 and TKinter running on my smartphone. I wrote a
 minimal app and I see a dialog with a button, but since it is a
 smartphone which does only have number keys and a jog dial to control
 the input, the window stays unresponsive to input. I cannot even set
 the focus to a control.

 In general smartphone programming is slightly different from programming for a
 standard Pocket PC device.

 As you mentioned the first issue you typically come across is the lack of 
 ability
 to select a control. The solution to this is to programatically select the 
 first
 control on your window when initialising it. The OS has support within the 
 default
 window procedure to then allow the user to tab between controls when the up 
 or
 down arrow keys are pressed.

 A potentially larger problem with TKinter (a toolkit that I have no experience
 with) are issues around the standard controls such as combo boxes and buttons.

 On a Windows Mobile smartphone standard controls such as a combo box are 
 exactly
 the same as you would see on a Pocket PC device. This leads to usability 
 problems,
 for instance with a combo box there is no way to drop down it's list without 
 being
 able to click on the little arrow button to the side of the control, which you
 obviously can't do on most smartphones.

 For this reason Microsoft suggests using a series of alternative controls. For
 example what you may think is a combo box within a smartphone application is
 probably a 1 line high listbox coupled with an up/down spinbox auto-buddy 
 docked to
 its right.  Application frameworks such as the .NET Compact Framework 
 generally
 abstract this different within their control classes, so an application 
 programmer
 creates a combobox and the framework determines which set of native 
 controls need
 creation to implement this.

 I assume that TKinter probably hasn't been implemented with this kind of 
 thing in
 mind.

 Hope this helps,
 Christopher Fairbairn

 PS: Just thinking about it now I bieleve TKinter is a framework which 
 essentially
 draws all it's own custom controls. If this is the case the problem is 
 probably
 more involved, since you won't get the native OS support for selecting 
 controls on
 a smartphone etc.

 ___
 PythonCE mailing list
 PythonCE@python.org
 http://mail.python.org/mailman/listinfo/pythonce

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


[PythonCE] PythonCE on Smartphone (WM6)

2007-10-15 Thread Jorgen Bodde
Hi All,

I have PythonCE 2.5 and TKinter running on my smartphone. I wrote a
minimal app and I see a dialog with a button, but since it is a
smartphone which does only have number keys and a jog dial to control
the input, the window stays unresponsive to input. I cannot even set
the focus to a control.

Is there anything I need to do to get it to redirect the number keys
and make it focus a control?

Regards,
- Jorgen
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce