1 - Does exist a way to intercept an object movement?for example when I drag a button from pos(5,10) and drop it to pos(30,10), I would to display the coordinates of the button during the movement.Is that possible?(something like the event onMouseMoving).
2 - Exist a way to intercept the keyPress on an object?
In first I have thought that I could use a shortcut but a lot of the common shortcut are unavailable(control x,contrl v,canc etc).
In my case I would cancel an object from my solutionModel-form by pressing ‘canc’ button of my keyboard.
3 - the event ‘onRightClick’ of an object is invoked only if my form isn’t into designMode,is possible do that also in designMode(I want to show a popupmenu)?
Marco R.:
1 - Does exist a way to intercept an object movement?for example when I drag a button from pos(5,10) and drop it to pos(30,10), I would to display the coordinates of the button during the movement.Is that possible?(something like the event onMouseMoving).
The onDragOver event will only trigger once when you drag it over an element so showing a continues feedback of the dragged position is not possible.
I suggest you file a feature request if you really want this.
Marco R.:
2 - Exist a way to intercept the keyPress on an object?
In first I have thought that I could use a shortcut but a lot of the common shortcut are unavailable(control x,contrl v,canc etc).
In my case I would cancel an object from my solutionModel-form by pressing ‘canc’ button of my keyboard.
You can use the Window plugin to register a window wide (or form wide) keystroke that is connected to a method. You can add and remove these on the fly.
Your third question can probably answered best by Johan.
The onDragOver event will only trigger once when you drag it over an element so showing a continues feedback of the dragged position is not possible.
I suggest you file a feature request if you really want this.
Ok,I’ll do it!
You can use the Window plugin to register a window wide (or form wide) keystroke that is connected to a method. You can add and remove these on the fly.
Yes, I can use it but only complex combinations for the user (es:“control shift z”)are available.I understand that the most common combinations are Operating System-reserved(Windows xp in my case) like ‘control-x’, so I have asked for KEYPRESS
Marco R.:
3 - the event ‘onRightClick’ of an object is invoked only if my form isn’t into designMode,is possible do that also in designMode(I want to show a popupmenu)?
i was asked by robert to answer this i believe so here i go…
in design mode no events are triggered at all. Because that would be a bit weird to do stuff in design mode like altering record data, going into find and so on…
You also dont really click on buttons thats just simulated…
Because that would be a bit weird to do stuff in design mode like altering record data, going into find and so on…
I’m not completely agree with this,I would like have always the full control of my objects and decide if to do or not to do something
however I would make a copy of the button,display some information and other actions;
at now I have put an external button that make the design mode on/off ,so I can trigger the right-click-menu on my button
what events then should work?
do you expect button clicks to work? focus events to work?
What happens if you do in your popup menu code controller.find() ??
Currently all events are just disabled because the form events shouldnt know anything about that it is in design. Thats weird.
If you have a form in design then that form is not “alive”.
what events then should work?
do you expect button clicks to work? focus events to work?
Yes, but this event just still “work” by onSelection event of design mode
What happens if you do in your popup menu code controller.find() ??
I think a mistake but there are thousand way to put a program in error,sometime an action is allowed and sometime no,this happens always .
Currently all events are just disabled because the form events shouldnt know anything about that it is in design. Thats weird.
If you have a form in design then that form is not “alive”.
Ok I have understood so a solution could be that the onSelection return the kind of button that I have used (at now always return type = rightClick)
the onSelection is pure designer specific, its a super imposed event over the form.
And what is called is the method that you give when you set the form in design.
Design mode can be seen as a god mode over that form, the form itself shouldnt know that it is in design… That is something only the outside world knows.
So to fix the issue you have is something that also needs to be pushed from the outside…
so maybe something like adding an onrightclick: