Ed Leafe wrote:
> On Jan 4, 2007, at 4:56 PM, Carl Karsten wrote:
>
>> What I am talking about:
>> """
>> * Select the text to copy.
>> This causes the text to become the Primary Selection.
>> * In another window, click the middle mouse button.
>> This causes the current value of the Primary selection to be
>> inserted.
>> """
>>
>> http://www.jwz.org/doc/x-cut-and-paste.html
>>
>> I have a feeling it is a wx thing.
>>
>> I am hoping it is a simple "set this prop" thing.
>
> No, it isn't. What you describe is an X-specific behavior that
> doesn't exist in any other UI environment that I know of.
>
> If you want to add it to your apps, you could try binding code to
> the dEvents.MouseMiddleDown, dEvents.MouseMiddleUp, and/or
> dEvents.MouseMiddleClick events.
Which is another i-layer kinda thing, which I don't see how to do. Not
anything
like the dbCarl.py thing anyway.
Lets say I just want MouseMiddleClick to put the letter X in the control (I'll
worry about X-selection and the InsertionPosition later.) How do I make that
happen?
I am guessing I only want to hit dEditBox and dTextBox. If there is a simple
way to hit both with one bit of code, fine. otherwise lets just use dTextBox.
Somewhere I need to put self.value='x'.
Here are some of the things I found:
dDataControlMixin.py:
didn't see anything relevant.
dTextBox.py
class dTextBox(dcm.dDataControlMixin, wx.TextCtrl):
# uiwx/dPemMixin.py
def __onWxMouseMiddleUp(self, evt):
self.raiseEvent(dEvents.MouseMiddleUp, evt)
if self._mouseMiddleDown:
# mouse went down and up in this control: send a click:
self.raiseEvent(dEvents.MouseMiddleClick, evt)
self._mouseMiddleDown = False
I went looking in SimpleFormWithBizobj.py and hit the FieldSpec stuff, so I am
guessing that is not a good example.
What is currently the best demo to start with?
Carl K
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev