如果我創建使用下面的代碼一個新的外殼:如何創建不帶標題欄/關閉按鈕的可移動SWT外殼?
shell = new Shell(Display.getDefault(), SWT.RESIZE);
然後這給了我沒有標題欄的殼或最小化/最大化按鈕,這就是我想要的。我可以將此窗口調整爲任何大小,這非常棒。但問題是,窗戶是固定的,我無法通過拖動它來移動它。
如果我添加SWT.CASCADE
或SWT.CLOSE
,這給了我不想要的標題欄和關閉按鈕,而且它限制了窗口可以調整大小的限制,也就是說我不能調整它的水平超過一定的限制。
如何在不關閉按鈕/標題欄的情況下使窗口移動?如果在SWT中沒有本地方法來做到這一點,我可以通過監聽鼠標拖動事件並手動設置shell的位置來做到這一點嗎?如果是這樣,我將如何從鼠標的移動中獲得鼠標座標?
幫助將不勝感激。謝謝!
謝謝,我已經實現了一個類似的解決方案,但我與它有另外一個問題。有什麼機會可以幫忙? http://stackoverflow.com/questions/18952545/how-to-show-a-rapidly-changing-image-in-an-swt-canvas-paintcontrol-listener – user2790209