简体   繁体   中英

Close button in CTabFolderRenderer in SWT

I have a requirement to have a close Button (Native) in CTabFolder for close action. To say precisely I need a native Button with text " close ". I have a CustomCTabFolderRenderer with drawClose method being overidden. I did manage to draw an image, but client didn't like that. Rather than drawing any polygon or image using the GC is there any way to draw a native Button? I could have drawn a rectangle with some text, but I'm worried that it cant give a native look. I would be pretty much happy even if I can get a solution to draw a Windows OS button(I mean any implentation that works just on windows)

As reported here , there is currently no way to draw native OS resources yourself, ie SWT does not supply methods to do this.

Furthermore, you can't subclass CTabFolder without a great amount of voodoo power.


As a conclusion: There is no "easy" way to do this. If it is possible, it would require a lot of work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM