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.
Related
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.
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 can i find the specific button on design mode where i have several buttons ie: hundered of buttons so that they all like spaghetti and one button may be under another button or a groupbox (i might be playing with the visibilities ) and i want to see my button number 83 on the design. how can i see him? where is he hiding? :) i use visual studio as an IDE. thanks.
MessageBox.Show(" where is the specific button? i know that he is somewhere on the form but cant distinguish it on the design since its somewhere under something i cant find it");
Use Document Outline (View - Other Windows - Document Outline)
Just pick the button from the tree and voila.
PS: this works for other types of designers (WPF/Silverlight, ASP.NET)
You can access it via the Properties Window. There is a drop-down that will list all of the items in your form in design mode.
Then use the drop-down. The drop-down will list all of the items on your form so you will scroll through the list to find Button number 83.
Images were pulled from MS Visual Studio: The properties Window which contains an explanation of the window.
Have you tried using the properties window?
I am looking for a nice comment box, instead of creating something with textbox and a button. Windows live photos has a nice comment box under each photo, it is one line with a small triangle on left bottom , which makes it look like dialog box from comic books. It also has send button on the right inside the box so no additional buttons. How can I do something like this ?
It is not that easy to find ready-to-go templates for input controls, so why not create your own? You can start by reading this MSDN article. All you need is learn the basics of templating and then you'll be able to reproduce the style you want.
I would like to add in my web app ability to add comments to a specific word in the page. Something like the LaTex footnotes.
The UI I had in mind is, each word would be highlighted when the mouse hovers over it (or that the space after it is being highlighted), and when the user clicks, a textbox to enter the comment pops up near the place the comment would appear. After the user entered the comment a little number would appear after this word in the web page, and other users would be able to click on this number and reveal the comment.
The architecture I had in mind is, a client side javascript program that would handle the view. The model and the controller would be on the server. They would save the document in some textile-like format (say, StackOverflow's question's format), and would only verify permissions (ie users would only be allowed to add [1] (user-name) ... to the document body
).
That's the architecture and UI I had in mind, but I'm open to new suggestions.
Is there any similar component availible?
I have been developing one with similar features. I use jQuery as the main framework and build on it.
1.select text to add some footnote to it.
2.click on the bubble to show dialog for enter your comments.
3.text with comments highlighted. Mouse hover over to bring up the dialog window with comments
entered earlier, hover out to close dialog window.
(pics here)
It is not perfect now and I am trying to make it a plugin(javascript code) with JSP(maybe. it's coldfusion now.)
The best thing I found so is the digress plugin for wordpress which allows paragraph-based comments.