TimeCtrl for touch screen usage

Hi,
I’m trying to adjust the TimeCtrl widget in wx.lib.masked for touch screen use. After fiddling the font size of the time box, and button size of the spin button, I got something that nearly suits my need, however, the white space on the time box is wasteful – see attachment.
Can anyone tell me how to shink the whitespace, please? Really appreciate that.
My sample code is in the attachment.
Thanks
Cliff

timeCtrl.py (2.25 KB)

time control.JPG

Cliff Xuan wrote:

Hi,
I'm trying to adjust the TimeCtrl widget in wx.lib.masked for touch screen use. After fiddling the font size of the time box, and button size of the spin button, I got something that nearly suits my need, however, the white space on the time box is wasteful -- see attachment.
Can anyone tell me how to shink the whitespace, please?

Set the minsize to whatever you want it to be.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi,

Is there an extension class to wx.TreeCtrl that supports greying-out of a tree node, which also makes it un-choosable ?

I need to create the following functionality:
Not all leaves in a TreeCtrl derived class I have are operational.
I need to give my user some visual indication which leaves are clickable and which aren't, and it would be nice if those greyed-out leaves would also ignore tree events.

Bye,
Ron.

Is there an extension class to wx.TreeCtrl that supports greying-out of a tree node, which also makes it un-choosable ?

I need to create the following functionality:
Not all leaves in a TreeCtrl derived class I have are operational.
I need to give my user some visual indication which leaves are clickable and which aren't, and it would be nice if those greyed-out leaves would also ignore tree events.

I don't think there is ... but could be wrong. I think it is up to
you to do this in your code.

In my tree control, I use the PyData property to store a value and
change/modify the tree item (Image, Attributes, etc), based on this
value. In the relevant event I test for this value and then
skip/execute the code block based on the event.GetItem().GetPyData()
value.

Hope that helps.
g.

Hi,

Is there an extension class to wx.TreeCtrl that supports greying-out of a tree node, which also makes it un-choosable ?

I need to create the following functionality:
Not all leaves in a TreeCtrl derived class I have are operational.
I need to give my user some visual indication which leaves are clickable and which aren't, and it would be nice if those greyed-out leaves would also ignore tree events.

I don't think there is ... but could be wrong. I think it is up to
you to do this in your code.

In my tree control, I use the PyData property to store a value and
change/modify the tree item (Image, Attributes, etc), based on this
value. In the relevant event I test for this value and then
skip/execute the code block based on the event.GetItem().GetPyData()
value.

There should be two or three of rules set in stone somewhere: when you
are looking for a component/widget in wxPython:

Rule no. 1: Play with the wxPython demo
Rule no. 2: Play AGAIN with the wxPython demo
Rule no. 3: Look in wx.lib

In this case, open the wxPython demo, go to the bottom-left search
control, and type "TreeCtrl". Magically, there is an entry called
"CustomTreeCtrl" under "Advanced Generic Widgets". The answer you are
looking for is:

wx.lib.agw.customtreectrl.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Thu, Apr 30, 2009 at 3:27 PM, geoff wrote:

Andrea Gavana wrote:

Hi,

Is there an extension class to wx.TreeCtrl that supports greying-out of a tree node, which also makes it un-choosable ?

I need to create the following functionality:
Not all leaves in a TreeCtrl derived class I have are operational.
I need to give my user some visual indication which leaves are clickable and which aren't, and it would be nice if those greyed-out leaves would also ignore tree events.
      

I don't think there is ... but could be wrong. I think it is up to
you to do this in your code.

In my tree control, I use the PyData property to store a value and
change/modify the tree item (Image, Attributes, etc), based on this
value. In the relevant event I test for this value and then
skip/execute the code block based on the event.GetItem().GetPyData()
value.
    
There should be two or three of rules set in stone somewhere: when you
are looking for a component/widget in wxPython:

Rule no. 1: Play with the wxPython demo
Rule no. 2: Play AGAIN with the wxPython demo
Rule no. 3: Look in wx.lib

In this case, open the wxPython demo, go to the bottom-left search
control, and type "TreeCtrl". Magically, there is an entry called
"CustomTreeCtrl" under "Advanced Generic Widgets". The answer you are
looking for is:

wx.lib.agw.customtreectrl.

Andrea.

And I thought the "agw" meant Andrea Gavana's Widgets...or maybe that's the secret name...

···

On Thu, Apr 30, 2009 at 3:27 PM, geoff wrote:

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Mike Driscoll wrote:

And I thought the "agw" meant Andrea Gavana's Widgets...or maybe that's the secret name...

<wink><wink>

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!