How to highlight text on focus in windows phone 7? - windows-phone-7

How do you highlight a the text in a TextBox control in Windows Phone 7? I can't find a property setting on the control.
Is handling OnFocus event in the code-behind the only option?

You can highlight text using TextBox.Select(int start, int length).

There's actually a pretty great attached property that you can use to do this. You can see an original description of the solution of auto selecting text in a textbox and also see a project where I made user of it.

Related

How can I add the Text Highlight Color control to a custom xml ribbon in PowerPoint?

I'm building a custom ribbon in PowerPoint and would like to include the Text Highlight Color Picker control on it. I've found an idMso called TextHighlightColorPicker, but it's not recognised by PowerPoint so I just get an error when I open it.
<control idMso="TextHighlightColorPicker" size="large" label=" " />
I've tried various other idMso with the word 'highlight' in but to no avail. I imagine it's simply not available for custom ribbons, but I thought I check to see if anyone knows, because it's seems strange that most of the other buttons are available but not that one.
Thanks in advance!
There is no such command available in PowerPoint 2016. You can find the list of commands available if you navigate to the Customize Ribbon on PowerPoint settings dialog:
Here you can find the list of all available controls. And if you hover the mouse over any entry you may find the idMso value which can be used in the code for building a custom UI.
I eventually found the idMso as per the instructions in Eugene Astafiev's answer, it turns out it is only avaiable in subscription versions. The id is "TextHighlightColorPickerLicense".

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

Activereports (under VB6) issue

I have to modify an old VB6 program that uses ActiveReports 2.0 at work and I am having some problems (BTW I have never used this program before and only have a basic knowledge of VB6)...
I have to make some text boxes biggers which is pretty easy to do but as soon as I move them a whole section of text (and not simply the content of that text box) disappear.
I have noticed that it was in some sort of section (sorry, I don't know how they call that) which englobed those text boxes so I made it bigger and that made no difference.
What could be causing this?
Thank you!
Nick
It sounds like the TextBox is inside a UserControl. A UserControl is created by a developer, and is basically one control with any number of other controls in it. You can check to see if there are any User Controls in your project in the Project Explorer (Ctrl+R).
One way to know exactly what class the control belongs to is to open your form in design mode (Shift+F7), click on the control, and look at the Properties window (F4). The drop-down list should show the currently selected control's class name in bold, then the name of the object.
What is the control's class? If it is anything other than TextBox, then this would explain the unexpected behavior you experienced.

Unable to get system fonts on Panel's CreationComplete event on Mac

I am developing a Flex Panel, which has two combo-boxes. One of the combo-box will display the system fonts and the other combo-box will display the corresponding styles. For eg the first combo-box will display "Arial" then the other combo-box will display the following list:
Regular
Bold
Italic etc
I wrote the code "Photoshop.app.fonts" on my Panel's creation complete. This works fine when used in Windows but when I use the same code on Mac, this code does not work.
I saw that when I trace the "Photoshop.app.fonts.length" on Panel's creation complete on Mac the value returned is 0 while if I use the same code in click of a button i.e basically after the panel is fully created I get correct value ie 394.
Can someone please guide me why this is happening? and an alternate solution to get system fonts on Panel's creation complete event for Mac.
Thanks.
I have solved this problem by using PSMacDom which recursively calls my Panel's creation-complete function, which then retrives all the system fonts.
Thanks.

How to use the color picker dialog to set color properties in the property editor?

This sounds like a trivial question, but it's proved quite hard to google anything about this.
When editing Color-typed properties through the property editor (when designing WinForms), a little editor pops up with three tabs: Custom, Web and System. I want to set a custom color by using the standard color picker dialog because none of the listed Custom colors are suitable.
I am sure that this used to be possible by double-clicking a blank color on the Custom tab, but this just picks the color being double-clicked and closes the drop-down in my VS2008. Am I imagining this, or did it really use to be possible? Can I do this in VS2008 somehow?
Right click on a blank colour in the palette shown by the custom tab. Brings up the "Define Color" dialog (in VS2008 C# Express, and I imagine the same in other versions).
EDIT - Having discovered this by experimentation, the MSDN library describes it here.
Interestingly, no keyboard-only interface is described.

Resources