2017-10-23 2 views
0

私はSWT(移植されたMac OSX版)アプリケーションを作成しています。私は "インライン"のベゼルスタイルを持つ特定のボタンを設定しようとしています。ここでは、私のボタンをMac上に見せたいものです。SWB NSButtonでsetBezelStyleが機能しない -

inline button(Xcodeでストーリーボードビューでscreenshotted)

私は、このインラインボタンを取得しようとする使用していますコード:

// created button named "inlineButton" and applied layout to it. 
// here is where I set the bezel style and text. 
NSButton nsInlineButton = (NSButton) inlineButton.view; 
nsSaveButton.setBezelStyle(15); // NSBezelStyleInline is enum 15 for cocoa 
this.inlineButton.setText("Inline Button"); 

そして結果:

buggy not inline button(私からscreenshotted Javaプログラム)

私はまた、シェルを再レイアウトしようとしました。 役立たず。 これはバグですか?何か間違っていますか?

答えて

0

解決済み。 SWATスタイルの「FLAT」を追加するだけでした。

this.inlineButton = new Button(this, SWT.FLAT); 
NSButton inlineButton = (NSButton) inlineButton.view; 
inlineButton.setBezelStyle(15); 
関連する問題