LEADTOOLS Support
General
General Questions
drag&drop from thumbnail browser to ContainerViewer?
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, December 11, 2006 5:01:58 PM(UTC)
Groups: Registered
Posts: 2
I am using v14.5, and VB.NET
I want to drag & drop images from RasterThumbnailBrowser to
one of boxes of AxLTRASTERCONVIEWLib.AxLEADRasterContainerViewer.
How? ContainerViewer doesn't seem to support drag and drop events.
If drag&drop is not possible, I want to at least intercept click event
on the ContainerViewer. How?
#2
Posted
:
Tuesday, December 12, 2006 4:47:34 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
There seems to be a limitation in Visual Studio .NET because
one of my colleagues tried in the past and could not get Drag Drop events to
work in a different ActiveX control. He found the following remark on Microsoft
web site:
"The DragDrop event is not supported by the AxHost
class."
This is the class that wraps the ActiveX controls when they
are added to Visual Studio .NET
The source of the remark is:
http://msdn.microsoft.co...stclassdragdroptopic.asp
To get click events, the following code sample causes
left-click mouse action to copy the image to a LEADRasterView OCX control on
the same form.
private void button1_Click(object sender, System.EventArgs
e)
{
LTRASTERIOLib.LEADRasterIO
io = new LTRASTERIOLib.LEADRasterIOClass();
LTRASTERLib.LEADRaster ras = new LTRASTERLib.LEADRasterClass();
io.Load(ras,
"c:\\temp\\11.jpg", 0, 1, 1);
short i =
axLEADRasterContainerViewer1.InsertCell(-1, 0);
axLEADRasterContainerViewer1.Cell(i).InsertBitmapList(ras,
true, 0);
io.Load(ras,
"c:\\temp\\ocr1.tif", 0, 1, 1);
i =
axLEADRasterContainerViewer1.InsertCell(-1, 0);
axLEADRasterContainerViewer1.Cell(i).InsertBitmapList(ras, true, 0);
if(!axLEADRasterContainerViewer1.OwnerAction(0).Use)
axLEADRasterContainerViewer1.OwnerAction(0).ActivateAction(true, 0);
axLEADRasterContainerViewer1.OwnerAction(0).SetMouseButtonAction(
LTRASTERCONVIEWLib.MouseButtonConstants.CONVIEW_MOUSE_BUTTON_LEFT, (int)(LTRASTERCONVIEWLib.SetActionConstants.CONVIEW_ACTION_ACTIVEONLY
|
LTRASTERCONVIEWLib.SetActionConstants.CONVIEW_ACTION_REALTIME));
}
private void
axLEADRasterContainerViewer1_MouseDownEvent(object sender,
AxLTRASTERCONVIEWLib._ILEADRasterContainerViewerEvents_MouseDownEvent e)
{
LTRASTERLib.LEADRaster ras;
for(int i=0;
i<axLEADRasterContainerViewer1.CellCount; ++i)
if(axLEADRasterContainerViewer1.Cell(i).Select)
{
ras =
(LTRASTERLib.LEADRaster)axLEADRasterContainerViewer1.Cell(i).BitmapListUnk;
axLEADRasterView1.Raster.Bitmap = ras.Bitmap;
axLEADRasterContainerViewer1.Cell(i).Select = false;
}
}
LEADTOOLS Support
General
General Questions
drag&drop from thumbnail browser to ContainerViewer?
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.