build tooltip for fxg button - apache-flex

I have a nice looking fxg button, to which I want to attach a tooltip- how do I achieve that without much hassle? (the spark button does this out-of-box, but is not very visually pleasing)
The examples I have seen on search is reverse- using fxg effects in the tooltip...
Thanks again for any guidance/ pointers

Typically you use FXG to draw the skin for a Button, then attach that skin to your Button (either by CSS or by setting the skinClass style on the button when it is declared.) That way you get all of the behaviors of a standard Button drawn however you like using your FXG. You do this by creating a new ButtonSkin based on the default spark ButtonSkin and replacing the default FXG with your own. You will then get the tool tip functionality for free. Hope that helps.

Related

how to get a "lightbox" like behaviour in Qt

I have a Qt project where I'm using QGraphicsView framework, also I have popup windows on the scenes. (QDialogs)
When someone clicks on a certain button a popup window appears, and I'm invoking it with the .exec() method instead of .show() to make it the active one. Also I want to give it a visual effect like lightbox provides for html pages, so it would be obvious for the user too, that the background window won't communicate. Do you know any simple solution to make it work? or is it hard to implement in Qt?
EDIT: I don't know if it's obvious of not, but it's a desktop application, not a web application.
Just create QFrame over necessary area with customized background and transparency. For animation effect you may use QPropertyAnimation + QGraphicEffects and other stuff from qt animation framework.
Now I found another way to accomplish what I wanted. Like this:
QWidget* mytranswidget = new QWidget(mybgwidget);
mytranswidget->setStyleSheet( "background:transparent; background-color:rgba(0,0,0‌​,95)");
mytranswidget->setWindowFlag(Qt::FramelessWindowHint);
mytranswidget->setGeometry(mybgwidget->rect());
mytranswidget->show();
I'm doing it at the beginning of my popup widget's constructor so it's being drawn before draw my popup, so it will be shown in the right order.

Add a button to a treeview row

Is it possible to have a button as a cell renderer in a tree view with gtk2?
There is no documentation of something like a button cell renderer.
It is possible, but you have to write it yourself. There are probably some open-source applications floating around that do it.

skin the dropdownbox

i am wondering if there is a way to skin the whole drop down box, after searching Google i could only find thing like adding icons resizing and alike, but no full skinning of the box.
Is this at all possible and if so how? i would very much like my whole program to be skinned rather than everything but the drop down boxes.
I am more of a designer than a coder so as far as code goes I'm quite a novice with the code side, would be a great help if you could give me a point in the right direction and/or a quick insight how to do it.
in flex... sorry
Thanks.
i am wondering if there is a way to skin the whole drop down box,
Yes, create a custom skin class for the DropDownList, just like you would any other Spark class. You can use code for the DropDownListSkin as a reference point for creating your own. In Flash Builder, if you create a new MXML Skin; and specify the hostComponent as a DropDownList then you'll get the DropDownListSkin code as a starter point for your customization.
For more info, read these docs on skinning Spark Components.
We did, in essence, exactly this to create our Mobile DropDownList.

Using custom button for ButtonBar's middleButton skin part

I made a custom component, BitmapButton, which is based on spark.components.Button. It basically just takes three Bitmap objects - upBitmap, overBitmap and downBitmap - and then its skin class, BitmapButtonSkin, uses these bitmaps for each state.
Now the problem: I want to make a ButtonBar which uses my BitmapButton for its buttons. What do you think would be the right way to approach this? Do I need to create a new component such as ToggleBitmapButton and then its skin or can I reuse the classes I've already made?
You need only create a custom skin for the ButtonBar and inside it use custom skins for the buttons. From what you have described as your goal, I see no need to create custom components, neither for the ButtonBar, nor for the buttons themselves.

Flex TitleWindow (or NativeWindow) skinned as a Fancybox?

The customer I am working for wants to display popup in an AIR application (designed in Flex 4).I will therefore use TitleWindow and PopupManager for this (or NativeWindow could be an option too).
Pretty basic, I can handle this.
Trouble is, this customer would like this popup to be looking as a Fancybox, that is, with the close button, slightly out of the popup.
Do you know how to do this ?
Easy enough. Just create a custom skin based for your TitleWindow which you can then change the appearance and location of the close button (among other things). The setup is fairly straightforward, but you should look up how to skin in Flex 4.

Resources