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

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.

Related

Is it possible to display custom icon in Visual Studio status bar

I am aware of displaying custom text in Visual Studio status bar using IVSStatusBar interface. I have even blogged about it.
However, I have requirement to display custom icon on the Visual Studio status bar. Similar to what Resharper does to display solution errors. On clicking the icon, it also pops-up a context menu.
So, How can I display a custom icon in Visual Studio status bar, and if possible display a menu also on clicking it?. An example will help.
The Animation method of IVSStatusBar already display icons, but uses predefined icons defined in Constants. Is it possible to have custom icons and pass to Animation method?
On exploring the SDK, I found that IVSStatusBarUser interface can be used to display custom information when the window implementing that interface is displayed. But I am not sure whether that interface can be used to display custom icon.
There is no published API for that kind of status bar extensibility. In one of my own extensions (PerfWatson Monitor), I locate the status bar element by searching the WPF visual tree, using a recursive search and VisualTreeHelper, descending from Application.Current.MainWindow looking for the resize gripper in the bottom right - a child element with the Name property set to
"ResizeGripControl". When I've found the gripper, I look at its parent (it should be a DockPanel) and insert my control in there. Note that, as your screenshot shows, Resharper is known to employ a similar trick, so you'll have to come up with a strategy that works with and without Resharper installed. Also note that some pieces of the status bar (the text, the line/col information and any animations) run in their own UI thread, so be careful if your control ends up there.
I notice you also ask about extending the existing animations. Yes, you can supply your own animations via a bitmap strip of 16x16 frames. See http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/fef208e7-b79d-4a0c-94fe-e6861196e1f5/#ba47b61c-77a8-46c8-aa10-a04211312e6c for an example. Unfortunately, this won't allow a clickable menu.

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

reload after customize

i have a very simple firefox addon that essentially just displays the total number of open tabs.
So far it works beautifully, however after right clicking on the toolbar and selecting Customize… it only shows the default text until a tab is opened or closed.
i presume that i need to add an event listener for this event and call updateWidget(), however i can't find it in the API doc. So does anyone know how to do it?
Verified as bug, see : bugzilla.mozilla.org/show_bug.cgi?id=773297

How make stylistic buttons windows 7?

I want use buttons on my application like this (see picture).
This isn't usual buttons, it have standard picture, caption and description.
Could anyone help me with it? (Post some code or something else)
The button you mentioned is called a Command Link
Windows Vista and Version 6.00 introduced another kind of push button, the command link.
Visually, a command link is very different from a normal push button, but it has the same functionality.
A command link typically displays an arrow icon, a line of text, and additional text in a smaller font.
Here is a list of styles available for buttons.
http://msdn.microsoft.com/en-us/library/bb775951(VS.85).aspx
Note the constant BS_COMMANDLINK and BS_DEFCOMMANDLINK at the above weppage
If you create a button using the BUTTON class with the CreateWindow or CreateWindowEx function, you can specify any of the button styles listed
Design concepts for Command Link
Check this link to see the various types of buttons.
http://msdn.microsoft.com/en-us/library/bb775947(VS.85).aspx
Here is the code example for creating a Command Link in C#
Vista Command Link Control with C# / Windows Forms
Hope this helps.

grails ui dialog

I am trying to do something which I would've thought was very simple, but it's causing me a huge headache. I am using Grails ui plugin to get a dialog box. I have a number of instances - some where dialog boxes need to appear when a button is clicked. This I have got working. But I also need to have some that appear when the page is loaded... for information / warning purposes. But I'm struggling with this.. What should I put as the trigger? I don't want the user to have to click anything before the dialog appears.
Also - has anyone successfully managed to change the style of the gui:dialog ? Mine was originally appearing as text with an invisible background before I added the class=yui-skin-sam to the main.gsp body, but that's had to replace the existing style class I already had on the body! how frustrating !!
Had the exact same problem... got it working by adding "visible=show" to the dialog's attributes. Example:
<gui:dialog title="Modal Dialog" modal="true" visible="show">
This message will appear in a modal dialog when the page loads.
</gui:dialog>

Resources