Вы попробовали решение, предложенное на Форуме MSDN "Windows Forms, Общие" , который просто разделяет TextBox на подклассы?
I can't answer your question directly, but I have run into a similar problem that I struggled with: taking a screenshot of a Shell
or Widget
while it is obstructed from view.
Consider, for instance, window A
that overlaps window B
. A screenshot is made of B
using your code:
Image screenshot = new Image(shellB.getDisplay(), shellB.getBounds());
GC.copyArea(screenshot, 0, 0);
My findings revealed that this could be done under Windows Vista, Windows 7 and Mac OS X (although I'm unsure about the latter). However, under Windows XP, Linux with GNOME and Linux with KDE, the screenshot contains a white area where the overlapping window obstructs the view.
I haven't found a solution for this, and I suspect that not only is this behavior platform dependent, but also fairly buggy in SWT.
I'd love to hear that I'm off the mark, though!