Changing icon place in MenuButton - qooxdoo

I'm having some troubles doing a very simple MenuButton. When I use a MenuButton the icon comes after the label (I mean right), instead of being left to it, as in qx.ui.form.Button.
Is there a simple way to put this icon in the right place ?

MenuButton inherits from Button, which has a property iconPosition - API docs here. Just set it to wherever you want your icon to appear.

Related

Getting Tab Component To Consume UIID

I have tried everything possible to style my Tab component but its not getting reflected. I want my selected Tab to have a white background and red foreground. Even though I have edited Style using Theme designer. Its still doesnt work. I read the docs and I am aware Tab component is now like a toggle. I did the suggestion to setTabUIID(null) but still cant get it to work. How can this be done.
You don't need the setTabUIID(null); just make sure to style both selected and unselected styles. Also override the Border to Empty if you don't define a border.

Override styling for md-autocomplete (change clear button icon)

I have a component that contains an md-autocomplete. This component is essentially being used as a searchable select list.
So, I'd like to change the icon of the clear-button from the 'X' to a down arrow.
I've tried the solution mentioned here, but that doesn't work for me, because I need the button to remain clickable.
Is there a way I can override the button styling in the component's CSS to specify a different icon to be used?

Trouble changing background color of TextField in Codename One

I just started building my first App with Codename One and I'm having quite some trouble. :-)
I cant change the background color of a TextField, I changed everything in the Theme and named it "TextField". At the Color tab I changed the background color and set Transparency to 255. Since the Component is named TextField, shouldnt the style be applied automatically when I make a new TextField?
I also tried to set the UIID manually to "TextField", which didn't help either.
Am I missing something?
Kind regards,
Max
The way backgrounds work in Codename One is this:
Border is applied first
Then image
Then gradient
Then color
TextField and other components such as Button etc. often have a default border derived from the theme.
Switch to the Border tab, click derive then click the ... button and select empty.

ng-class removes a class but does not put it back

In angular.js, I'm trying to apply a set of classes based on the value of a variable on $scope. But when I set a pair of space-delimited classes, ng-class seems to be removing any that are already present (and it doesn't put them back).
See the Fiddle here: http://jsfiddle.net/fLf0fenj/
Try clicking any of the gray buttons. An icon will appear. It's one from Font Awesome, and the class is fa fa-whatever. Now click another of the gray buttons. The icon should turn into another Font Awesome icon, but instead of that element having two classes (fa fa-something-else), it just has the fa-something-else, so it looks like a square.
If you instead click a gray button, and then the green button, it's all fine. Because that green button uses a glyphicons icon, and so the class names are all being switched out each time.
How do I get around this behavior?
Try
ng-class="statusIcon()"
And here's a working fiddle

How to use an image as a button in GTK?

How to use an image as a button in GTK in c language in code blocks? I have tried making the button of same color as that of the background and then adding image on it. But there is a outline or shadow still there. So, how can i remove those shadows or is there a way to directly use an image as a button?
One way is outlined by #Shabhaz, by putting the image in an EventBox, and handling the button-press event.
The other way is by placing the image in the button and customizing the style of the button to remove the outline and the shadow. You would call gtk_rc_parse_string() to define an outline-less button class, and gtk_widget_set_name() on your button to apply the style.

Resources