Page 1 of 1
how to use TaharezLook/StaticImage
Posted: Thu Oct 02, 2008 02:47
by syngen101
Hi,
I am using the TaharezLook/Button to create buttons but I wanted to have an image on the button. I thought of using TaharezLook/StaticImage and add it to the button. I was just wondering how to reference the image needed for the button.
Posted: Thu Oct 02, 2008 07:20
by scriptkid
Hi,
adding an image onto a button is a little overkill, instead use the TaharezLook/ImageButton directly, which has the following four properties to set:
NormalImage, HoverImage, PushedImage, DisabledImage.
I was just wondering how to reference the image needed for the button.
What do you mean? How to set images? An image is a combination of a set and an image inside it. For example:
Code: Select all
icon->setProperty("NormalImage", "set:TaharezLook image:MouseArrow");
HTH.
Posted: Sun Oct 05, 2008 23:09
by syngen101
Hi,
I was wondering how I create an ImageButton directly, I have been looking at the TarahezLook files (LookNFeel, Imageset), and the gui default sheet .layout file and I was wondering which I have to add to and how to add to them, to create an ImageButton.
Sorry I have never coded in XML before. Any help would be appreciated, also is there a link to an example of how to implement these buttons as im sure this has been done before.
Thank you in advance
Posted: Mon Oct 06, 2008 02:55
by traibuidoi
Posted: Mon Oct 06, 2008 04:38
by syngen101
Thanks for that I dont believe I didnt find that page on the website from my searches ><.
I was also wondering what programs can be used to make the image file (whether it be .png or .tga), I am currently trying to use Gimp but am finding it hard to add more then one item to a file with a 'empty' (not white) background.
Cheers for the help
Posted: Mon Oct 06, 2008 07:00
by scriptkid
Hi,
when you create a new image in Gimp, with Advanced Options choose Transparent background.
Also, make sure that you leave a few pixels of space between your sub-images, to avoid 'bleeding' on some combinations of videocard/driver and such.
HTH.
Posted: Sun Oct 12, 2008 07:40
by syngen101
thanks