SAPUI5 Icon in Image Control - image

We are using sap.ui.commons.Image control in our project and we need to set a font icon as the source.
The sap.ui.commons.Image is used in multiple places and are used in composite controls as well. However, we need to use icon-fonts as the source to the control. We could set SVG/PNG to the source and it works fine. However, we need to use icon-font.
Can anyone help?
<c:Image src='sap-icon://add' />

You will either have to download the icon and store it in your project
Or use a control that has an icon property for example a button or icon tab

Related

Why are icons in property sheets rendered with so few colors?

I am creating a property sheet shell extension and want to have a little icon to set off my property tab from the standard system tabs. Unfortunately, my icon is being rendered almost entirely in grey.
Original image:
In the property sheet tab:
At first I thought this was somehow my problem, but then I saw that TortoiseSVN appears to have the same problem:
This happens in both Windows 7 and Windows 8.
Does anyone know why these images are appearing so muted? Also, does anyone have any hints on how to make the icon look good in spite of this colorlessness?
The PropertySheet function initialises its tab control with a 16 color (ILC_COLOR) ImageList and copies the supplied icon for each page into it. There doesn't seem to be a way to override this and supply your own ImageList (or to specify the bit depth of the created ImageList). Presumably this is a legacy of the original Windows 95 code that never got updated as things moved on.
Instead of Property Sheets, you can use Tab Control, which makes tabs management more flexible and clear. And of course you can use any type of icons, because you have to create your own ImageList.
Here you can read about Tab Controls:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb760548(v=vs.85).aspx
And here you can access example usage of Tab Controls:
Icons in Win32 Property Pages are ugly - 4 bit icons

Making TextBox text theme aware

I created a page.i want to change the background of Textbox when theme of emulator is changed to light.The letters cant be visible while changing the themes.is there any solution?
If you use the default TextBox control inside Visual Studio it is fully theme aware. If you have set the colours yourself then you need to perform the theme aware changes in code behind.
For more information, please see the following :-
http://www.developer.nokia.com/Community/Wiki/ThemeawareWindowsPhoneapplication
I assume you are referring to TextBlock rather than TextBox (as the latter automatically has style support).
You should never declare a TextBlock without a Style attribute, such as Style={StaticResource PhoneTextNormalStyle}. A full list of available styles can be found on MSDN: Theme Resources for Windows Phone
Also of relevance is: How to: Apply Theme Resources for Windows Phone
NB: Due to the way Mango was designed, backing into your application after changing themes will not apply the new theme. You will need to restart the application to see the changed theme.
Update
Based on your screenshots, you have two choices:
Reskin ("Edit Template" in Blend) each of the controls that you use to redefine a style in which the various colour-related properties are hardcoded
Use an alternate, lighter, background image when in the white theme in order to improve the contrast. I've blogged about how you can define theme-aware resources (and also mentioned it on other SO questions).
Put simply, you can either submit to the theme or force it to remain the way you want it.
We can set a theme as default to our application.When we log in our application the phone theme will be changed to its suitable theme and when we log out change back to original
here s the link .

Change default font of controls in winforms

Is there any way to change default font of controls in winforms.
I must change font in about hundred font in recent project and it's coming next project with other fonts and I wanna at start setting properly fonts.
You should be able to select all the controls that are part of the form with Ctrl + A. Then change the font property. Or you could write something that would do that for you in the code behind.

Icon not displaying when exe is created in VB 6.0

For the exe generated, the Icon is not displayed. I added the Icon in the project Properties --> Make tab --> Application --> Icon. I am using Vb 6.0
I can see the icon in the project properties. but the same is not displayed when the exe is generated.
I added the icon in the resource file too. But its not displayed.
I added the image for it.
Any ideas on displaying the icon for the exe generated?
We've had problems with that in the past. I'm pretty sure it has to do with your icon dimensions being out of scope. Hack workaround - add a dummy form (frmIconHolder) with the 32x32 icon you want as the icon for that form. Then in the project Properties --> Make tab --> Application --> Icon, set it to this new form.
There are 2 methods to setting your exe's icon:
1: Set your Main Form's icon to the icon you want to use for the exe. On the make tab, from the Application Icon drop-down, select your form that has the icon you want to use. Compile.
2: Using a resource file. To do this, check out this forum post. Using this method, you have to use icons with max 256 colors.
The empirically-found boundaries for VB6 icons are: ICO format on ly, 48x48 in size, 16/24-bit colours
Make sure that your Icon does not exceed 256 colors and it has both 16x16 and 32x32 images in it.

Icon on ui tabs (validate)

I am trying to add an icon on ui tabs when validate fails.
Which method should i use (option is my guess).
Can anyone help me.
Thanks
How about have transparent or hidden icons (e.g. using background-image) to all tabs by default.
Use the validator to change the icon via css/class rather than adding/removing?

Resources