I am having trouble changing the background color of Dialog from white to any color.
I have tried the following code snippets but to no use.
dialog.getDialogStyle().setBgColor(0xffce78, true);
dialog.getUnselectedStyle().setBgImage(Image.createImage("/main_bg.png"));
dialog.getPressedStyle().setBgImage(Image.createImage("/main_bg.png"));
dialog.getSelectedStyle().setBgImage(Image.createImage("/main_bg.png"));
You need to use the dialog style getDialogStyle().
Regardless your code creates 3 separate yet identical images which is REALLY BAD! You are loading the same image 3 times into memory!
Is you image in the root directory? You should use the full path from the src folder, I mean, if your image is in the "images" package, you should put this path "/images/main_bg.png". If it is in the default package...."main_bg.png"
Related
I am working on a Kivy(Python) Project and I need to display approval(✓) and cross(X) symbol in different scenario. I can display cross symbol but unable to display other one. Is there any way to do this ? Thanks.
Note: I have tried, writing text:'✓' and text:u'2713' under Label in .kv file but it doesn't work.
The font supplied with Kivy doesn't include the tick mark. You need to use fonts that include those symbols. Tick is available in fonts Arial Unicode MS, Wingdings and Wingdings 2. You can download the font ttf file and have it in the same folder with your script.
Link to download the font
https://www.download-free-fonts.com/details/88978/arial-unicode-ms
Then include the font and use it in the label as follow:
Label:
font_name:'arial-unicode-ms.ttf'
text: "This is the tick ✓"
Bro I was also troubling from same problem from morning but now I figured it out actually so I would like to share it with you.I used below code:
def wrong_btn(self):
self.ids.wrong_button.text = u"⌫" self.ids.wrong_button.font_name=r"C:\Users\95532\AppData\Local\Microsoft\Windows\Fonts\Arial-Unicode-MS.ttf"
I used this to specify the folder in which the font is stored so you can also download the font you want and just specify the path and don't forget use a r i.e raw string mark or else it wont work I wasted my whole day searching for that hope this helps you bro
When I create a new image asset in Android Studio it has a white border on all four sides.
What setting should I use to avoid this ?
What I have done currently is to directly copy the images into drawable folder and use that image. This works but I don't get the flexibility of the multiple image that is generated when I use the create image asset.
If you are you speaking about this one:
Then all you can try to play with Shape, e.g.
BTW, there is Background parameter, too: you can choose any colour instead of white, if you wish.
I'm using svg as a background image (logo) in a WP menu plugin and i want it to change a color (fill) when hovered. As it's a free version of the plugin i can't use image, object etc - i have to use my svg as a background image. I've to support IE (9+) so masks/filters are out of question and i'm pretty much left with svg-sprites. That's okey, i know how to do it (using use/xlink:href).
But now comes a tricky part. I want my svg to change only fills of some groups/paths while hovered leaving others untouched. I can only change colors of all paths/groups together in a background image with svg-sprites afaik. Is there a way to do it? Thank you in advance!
I recently ported a project from VC6 to VS2012, fairly successfully. Trying to change out the splash screens and icon that were previously bad looking bitmaps. From the looks of it, 256 color bitmaps.
So, I made new bitmaps and tried to put them in and constantly get:
error RC2175: icon.ico is not in 3.00 format
I've searched for what this means and got:
http://msdn.microsoft.com/en-us/library/s49y5a1h(v=VS.80).aspx
error RC2175 : resource file res\icon3.bmp is not in 3.00 format?
And the worthless MSDN page.
I tried making these bitmaps as 24-bit, 256 color and 16 color. I also tried all the different modes Gimp allows mimicing the other, original icons. Also tried loading the bitmaps in MS Paint and re-saving without success.
And this point, I would just like some indication on what 3.00 format is and how to get around it.
So, I made new bitmaps
Which is surely where this went wrong. An .ico file is not just a bitmap. It is a file format of its own that's capable of storing multiple bitmaps. Which have bitmasks that indicate what part of the image is transparent or inverted.
So the best way to read the error message is for what it says: "this is not an icon". It can't meaningfully say more than that, it isn't going to try to guess what kind of file it actually might be. That you could load the file in MS Paint is another strong indication that the file was actually a bitmap and not an icon, Paint can't load icons. It doesn't have the plumbing to allow you to select the specific image from the .ico file you want to edit, nor any way to edit the bitmasks. Renaming a image file to .ico does not create a valid icon file.
You can create or edit icons with Visual Studio or one of many popular icon editing utilities.
I would like to know if there is a way use the built in export/getSVG function in Highstock to save the exported PNG to a variable in the background instead of prompting the user to download the file.
The thought is for a user to be able to click a button which will export each snapshot to a variable in the background. When done scrolling through the entire chart a subsequent button would create a document containing all the PNG images for a singe download. We can develop everything but the hangup is on saving the PNG image to a variable. We have been able to assign the SVG string to an array we maintain but due to size this would not be the best option for use.
Are there any ways to do this?
Something like this is possible to achieve, see FAQ
However, there is also one more option - get SVG, and use canvg to render into canvas and then to PNG file, as you need.