How to add checkbox image in eclipse e4? -


i using eclipse e4. need add image checkbox(checked , unchecked). have tried adding image in following way in table viewer. can see red spots in place of image.

i have used following code snippet.

private void createcheckedimage() {     bundle bundle = frameworkutil.getbundle(columnlabelprovider.class);     url url = filelocator.find(bundle, new path("icons/checkbox_yes.png"), null);     imagedescriptor imagedcr = imagedescriptor.createfromurl(url);     checked = imagedcr.createimage();   } 

i not sure whether doing correct. can suggest ideas?

the answer question small mistake have done in frameworkutil.getbundle() method. have added columnlabelprovider.class should class using. class name statisticspart. should following code snippet

private void createcheckedimage() {     bundle bundle = frameworkutil.getbundle(statisticspart.class);     url url = filelocator.find(bundle, new path("icons/checkbox_yes.png"), null);     imagedescriptor imagedcr = imagedescriptor.createfromurl(url);     checked = imagedcr.createimage();   } 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -