I am implementing e4 Application with Toolbar . I want both Image and text in Toolbar with text below the image How can I do this through Application.e4xml? or there are any way to achieve this.
As Mr Covex said, add FORCE_TEXT tag in the ToolItem. This will force eclipse to display both Icon and Text (if icon uri is set).
Related
I have implemented Eclipse RCP product in 4.5 (Mars) version. There is a part with toolbar. I want to show the part toolbar always in full span (covering the entire width of the part) and not on the part stack (on right side of the part tab).
I tried to add Part-Toolbar-FullSpan tag to the Part and also to the part toolbar but it is not helping.
I also tried to create a custom toolbar but that approach did not work out.
Do you know how I can show the part toolbar in full span?
Thank you.
Part-Toolbar-FullSpan appears to be for the e(fx)clipse JavaFX stack renderer only so it won't work with SWT.
The SWT stack renderer org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer uses the setTopRight method of CTabFolder to manage the toolbar. This will only push the toolbar on to a separate row when there not enough space for it on the tab row.
So it looks like the only way to do this would be to define a custom renderer factory and override the stack renderer. Unfortunately for what you want this would be a substantial change to the renderer.
I'm working on an Eclipse RCP 4 application and trying to add a HandledToolItem that displays both a label and an image to its left. Problem is whenever i add the image it only displays the image and hides the label. Is there any other way of getting this implemented other than creating a new ToolControl with a Button or a custom Toolbar that can handle this?
It would be nice to have the HandledToolItem because of the simpler management through Commands and Handlers.
Add FORCE_TEXT to the Tags (on the Supplementary tab) for the HandledToolItem in the e4xmi file.
I would like to show list of emotion icons / smiley icons when tap of a button. on selecting any, i want that icon to placed on my uitextview.
Is there any options to do with iPhone app , if not will it require more time to get it
Please let me know and thanks
NSAttributedString is a option to archive your goal.
There is a project you may have a look:
emotionlabel
It's based on DTCoreText project which enables you drawing simple rich text like any HTML document without having to use a UIWebView.
Take one UIImage that looks like UITextField and set it on the UILabel background image. Once the emoticon is selected, put it on the UILabel. Hope that would help you.
I just started working on an eclipse RCP application in my company and search now for following component:
In the eclipse preference dialog is a text input field with a eraser which clears the text box (see image).
Is there a component in eclipse RCP which does exactly that? Or one where I can set an image in a text input field, so I can implement just the functionality.
Or have I to write my own component extending from Text?
Thanks.
Eclipse does not offer such a component, so you will have to implement one yourself.
But I wouldn't extend Text for this. Simply create a Composite with SWT.BORDER style, and a Text and Button as children. If you don't give the Text a border, it looks like the button is within the text box. Instead of the Button you could use a ToolBar with a single ToolItem, both with the SWT.FLAT style. This will look much better than a regular button.
Text text = new Text(parent, SWT.SEARCH | SWT.ICON_CANCEL);
This is present in Luna's API, don't know about older versions. You can check more here: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet309.java?view=co
Could you tell me which font is used to display text on Toolbar buttons ?
I'm searching this to make a custom button.
Helvetica-Bold, 12 pt
Although you may be better off just creating the graphic (background) for the button and using the default title property of the button to set the relevant text.