deepshi03 wrote:How can i get the same functionality in CefGlue.Samples.WpfOsr??
It is not implemented in CEF - follow issue 554 Drag and Drop not support on Windows with offscreen rendering enabled.
Moderator: fddima
deepshi03 wrote:How can i get the same functionality in CefGlue.Samples.WpfOsr??
deepshi03 wrote:CefGlue.Samples.WpfOsr doesn't support combo box or drop down box functionality in any webpage. How can we correct this problem??
fddima wrote:It must fully implement CefRenderHandler's method (OnPaint) method. Good point to start making it - is look on cefclient code.
deepshi03 wrote:fddima wrote:It must fully implement CefRenderHandler's method (OnPaint) method. Good point to start making it - is look on cefclient code.
While implementing OnPaint method x and y coordinates of dirty rect is always 0,0 and so the drop down box opens up at the top left corner. How to get the correct x,y coordinate?? Please help
protected override void OnPopupShow(CefBrowser browser, bool show)
{
if (!show)
{
CefRectangle popup_rect = new CefRectangle();
popup_rect.X = 0;
popup_rect.Y = 0;
popup_rect.Height = 0;
popup_rect.Width = 0;
browser.GetHost().Invalidate(popup_rect, CefPaintElementType.View);
}
}
private CefRectangle directRectPopup;
protected override void OnPopupSize(CefBrowser browser, CefRectangle rect)
{
if (rect.Width <= 0 || rect.Height <= 0)
{
return;
}
CefRectangle original_popup_Rect= rect;
directRectPopup= _owner.GetPopupRectInWebView(original_popup_Rect);
}
internal CefRectangle GetPopupRectInWebView(CefRectangle popop_rect)
{
if (popop_rect.X < 0)
popop_rect.X = 0;
if (popop_rect.Y < 0)
popop_rect.Y = 0;
if (popop_rect.X + popop_rect.Width > _browserWidth)
popop_rect.Width =(int)_browserWidth - (int)popop_rect.Width;
if (popop_rect.Y + popop_rect.Height > _browserHeight)
popop_rect.Height = (int)_browserHeight - (int)popop_rect.Height;
return(popop_rect);
}
internal void HandleViewPaint_Popup(CefBrowser browser, CefPaintElementType type, CefRectangle dirtyRect, IntPtr buffer, int width, int height)
{
//browser.SetShowHidePopup(this.EnablePopup);
_mainUiDispatcher.Invoke(DispatcherPriority.Render, new Action(delegate
{
try
{
if (_browserSizeChanged)
{
_browserPageBitmap = new WriteableBitmap((int)_browserWidth, (int)_browserHeight, 96, 96, PixelFormats.Bgr32, null);
_browserPageImage.Source = _browserPageBitmap;
_browserSizeChanged = false;
}
int stride = width * 4;
int sourceBufferSize = stride * height;
int adjustedWidth = (int)dirtyRect.Width;
if (dirtyRect.X + dirtyRect.Width > (int)_browserPageBitmap.Width)
adjustedWidth = (int)_browserPageBitmap.Width - (int)dirtyRect.X;
int adjustedHeight = (int)dirtyRect.Height;
if (dirtyRect.Y + dirtyRect.Height > (int)_browserPageBitmap.Height)
adjustedHeight = (int)_browserPageBitmap.Height - (int)dirtyRect.Y;
Int32Rect sourceRect = new Int32Rect((int)0, (int)0, adjustedWidth, adjustedHeight);
_browserPageBitmap.WritePixels(sourceRect, buffer, sourceBufferSize, stride, dirtyRect.X, dirtyRect.Y;
}
catch (Exception ex)
{
//LogWriter.WriteMsg(LogLevel.Error, "WpfCefBrowser: Caught exception in HandleViewPaint(): {0} - {1}", ex.GetType(), ex.Message);
}
}));
}
deepshi03 wrote:Hi!!
While we set auto scroll by clicking middle button of the mouse, we get a strange CC character image in the web page. How can we change or remove that??
<img src="test.jpg" />
Users browsing this forum: No registered users and 63 guests