Subject | IB_JPegImage - Dragging Image from Win explorer and dropping on IB_JPegImage |
---|---|
Author | Adrian Wreyford |
Post date | 2007-12-17T06:53:25Z |
Hallo those of you unfortunate not to be on annual leave.
I never realised this, but I you have an IB_JPegimage on a form, and
connected to a IB_Query, with a IB_NavigationBar and IB_UpdateBar.
The following can happen:
In image viewed in WinExplorer, can be dragged and dropped on the
IB_JpegImage, putting it in edit state, and the new image is displayed.
The DragDrop Icon is also displayed correctly.
Under this scenario, the OnDragOver, OnDragDrop, OnDragEnd events of the
IB_JpegImage are NOT fired, thus I have now way to disallow or manipulate
this action.
They are only fired, when dragging from one IB_JpegImage to another, and
then I can control nicely.
This wouldn't have been a problem in my situation, if the dataset was placed
in insert mode, but unfortunately it is placed in Edit mode, and if the user
then posts the change, the image overwrites a previously stored image, and
does not add a new one as the perception could come across.
I need to somehow detect that an Image is being dropped .. ie. check that it
is a suitable, JPeg image.
Then place the dataset in insert mode, and then based on the users reaction
with the IB_UpdateBar, post or cancel change.
Any pointers will be appreciated.
Regards
Adrian Wreyford
[Non-text portions of this message have been removed]
I never realised this, but I you have an IB_JPegimage on a form, and
connected to a IB_Query, with a IB_NavigationBar and IB_UpdateBar.
The following can happen:
In image viewed in WinExplorer, can be dragged and dropped on the
IB_JpegImage, putting it in edit state, and the new image is displayed.
The DragDrop Icon is also displayed correctly.
Under this scenario, the OnDragOver, OnDragDrop, OnDragEnd events of the
IB_JpegImage are NOT fired, thus I have now way to disallow or manipulate
this action.
They are only fired, when dragging from one IB_JpegImage to another, and
then I can control nicely.
This wouldn't have been a problem in my situation, if the dataset was placed
in insert mode, but unfortunately it is placed in Edit mode, and if the user
then posts the change, the image overwrites a previously stored image, and
does not add a new one as the perception could come across.
I need to somehow detect that an Image is being dropped .. ie. check that it
is a suitable, JPeg image.
Then place the dataset in insert mode, and then based on the users reaction
with the IB_UpdateBar, post or cancel change.
Any pointers will be appreciated.
Regards
Adrian Wreyford
[Non-text portions of this message have been removed]