set gap between text and icon of command - codenameone

I am using command with text and icon and want to set gap between them
I try to setGap but the method is not available
command.setGap();
so how can set the gap?

Use:
command.putClientProperty("iconGap", new Integer(gap));

Related

Format to set active font

I can use format to set the current font size and color
quill.format('size', '18px');
quill.format('color', 'red');
but when I try to set the font name eg.
quill.format('font', 'Cursive');
it has no effect. The font, in this case 'cursive', exists in the font dropdown in the tool bar (and if you select it, it does become the current font).
How can I use format to set the active font?
I found that it's case sensitive. This
quill.format('font', 'Cursive');
doesn't work but this does
quill.format('font', 'cursive');

Change span label font size in codenameone

I want to show a multiline text so I use a span label. I am trying to set the font size from the gui but it does not change.
I also trying to set the color dynamicaly using the next code:
this.gui_Span_Info.getAllStyles().setFgColor(HTMLElement.COLOR_RED);
but nothing happens.
What should I do?
SpanLabel is a composite component which means it's built from 2 or more separate components one of which is a Container.
You can determine the UIID of the text using setTextUIID it defaults to the Label UIID.

Set focus on image by default

I use the froala editor. (using angular).
I want that the first image get focus on initialize.
When I open the editor I get the editor without focus
And I want it to be with the image toolbar
What I need to write in the "froalaEditor.initialized" event for focusing the first image
Thanks!

Set Row Style without using a CSS class

I'm working on Extjs 4.2 with a Ext.grid.Panel and I have to set programmatically the color of each row in the grid.
My first option is to use the "getRowClass" in viewConfig by returning a css class name like in the example of Skirtle's Den HERE. But my color is define by the user dynamically and I don't want to create a css file with all possible color.
My second option is to use the rowParams in "the getRowClass" like THIS but for 4.2 the rowParams is deprecated.
I can also override the rowTpl in viewConfig or set the color of each cell of a row thanks to meta.style in the renderer function from Ext.grid.colum.Column but maybe do you know an easier way to do that?
Try this:
Ext.fly(grid.getView().getNode(2)).setStyle({background:'yellow'});
I would set 3rd row of the grid to yellow, however, you still need to switch off the backgrounds of individual cells.

GtkStatusIcon label in Gnome3

How can affect on my app's status icon label in Gnome3? When i moving cursor on it shows me my app's executable name. How can I change it?
You can use gtk_status_icon_set_tooltip_text() or gtk_status_icon_set_tooltip_markup().
Alternatively, you can handle the query-tooltip signal and set the text dynamically when the tooltip is shown.
It was gtk_status_icon_set_title.

Resources