473,857 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XP Style custom dropdown button

Anyone created or has an idea how to create a custom
button that looks the same as the dropdown button on the
combo box in xp style.

Easy enough for non-xp style as standard flat style
allows the paint event to draw button as

ControlPaint.Dr awScrollButton( e.Graphics,
button2.ClientR ectangle,Scroll Button.Down,
ButtonState.Nor mal)

but as XP style requires flat style system, paint
nolonger has any effect.

Thanks
Nov 15 '05 #1
2 5954
Set the "FlatStyle" to "System" and add a manifest file to your app
directory. On XP, it will work the way you want it. HOwever, in other
systems, you will have to draw it yourself.

-vJ

"Steve Graham" <St************ *@msn.com> wrote in message
news:01******** *************** *****@phx.gbl.. .
Anyone created or has an idea how to create a custom
button that looks the same as the dropdown button on the
combo box in xp style.

Easy enough for non-xp style as standard flat style
allows the paint event to draw button as

ControlPaint.Dr awScrollButton( e.Graphics,
button2.ClientR ectangle,Scroll Button.Down,
ButtonState.Nor mal)

but as XP style requires flat style system, paint
nolonger has any effect.

Thanks

Nov 15 '05 #2
You can also enable XP visual styles by using:

Application.Ena bleVisualStyles ( );

make sure you use this code before the initializecompo nent( ) method.

Fabio Cavalcante

"Vijaye Raji" <no************ @hotmail.com> wrote in message
news:#j******** ******@TK2MSFTN GP11.phx.gbl...
Set the "FlatStyle" to "System" and add a manifest file to your app
directory. On XP, it will work the way you want it. HOwever, in other
systems, you will have to draw it yourself.

-vJ

"Steve Graham" <St************ *@msn.com> wrote in message
news:01******** *************** *****@phx.gbl.. .
Anyone created or has an idea how to create a custom
button that looks the same as the dropdown button on the
combo box in xp style.

Easy enough for non-xp style as standard flat style
allows the paint event to draw button as

ControlPaint.Dr awScrollButton( e.Graphics,
button2.ClientR ectangle,Scroll Button.Down,
ButtonState.Nor mal)

but as XP style requires flat style system, paint
nolonger has any effect.

Thanks


Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2071
by: jean | last post by:
hi: i am developing a custom combobox for my company's needs that is made up of a textbox, listbox, button. i am using c#. everything is fine except for one issue. in a normal combobox, when the dropdown is visible and the user clicks anywhere else, the dropdown gets hidden. i am trying to replicate this behavior and have tried using the Leave and LostFocus events. i have had marginal success when my dropdown is visible and i...
2
2782
by: Fred Flintstone | last post by:
I'm creating a multi-column dropdown since there isn't one. My idea is to override an Infragistics Combo and add the dropdown as a grid object. So I create a basic override of the control. The first thing I want the control to do is kill the default button and add a new one. So in the initialization (New) area of the control I add the code to do that: Me.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never Dim...
4
1473
by: Ahmed | last post by:
Hi everyone, Is there a way to add a toolbarbutton with dropdown menu similar to the mail button in IE? In another word, when the chevron is part of the button not beside it. Thanks Ahmed
0
1274
by: Kay | last post by:
Hello, I have developed a web custom control, I want one of the properties of the control to appear as a dropdown list so the user can select from the list. My question is: how do I define an editor to fill up the dropdown list, so far I have the following code which displays the property as a dropdown but I do not know how to get values it to it, I have only 3 values. Public Class EntryModeEditor Inherits...
0
1247
by: Kay | last post by:
Hello, I have developed a web custom control, I want one of the properties of the control to appear as a dropdown list so the user can select from the list. My question is: how do I define an editor to fill up the dropdown list, so far I have the following code which displays the property as a dropdown but I do not know how to get values it to it, I have only 3 values. Public Class EntryModeEditor Inherits...
0
373
by: pedery | last post by:
I have created an image selection dropdown editor for use in a PropertyGrid. My selector form is called dropdown by a IWindowsFormsEditorService and so far it's all sweet. On my selector form I have placed a lot of pictures the user can select from. I have also placed a button with "From File..." that opens an OpenFileDialog (Remember that this is still in the dropdown dialog form of the PropertyGrid). The problem is that when the...
0
1619
by: Kay O'Keeffe | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp textbox control which has a 'TextMode' property and when clicked on, displays as a dropdown list with 3 values, I want to have a similar type property with a dropdown style.
11
18173
by: Pete Kane | last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would contain tab pages of my own classes, I know you can achieve this with ListView columns so it should be doable, thanks
2
2073
by: aeden.jameson | last post by:
I have a drop-down list the I want to use to control the visibility of button fields. Here's an example of one of my button fields, <asp:ButtonField Visible='<%$ Code:ddlReason.SelectedValue = Status.Review %>' CommandName="Review" Text="Review" /> The value of ddlReason.SelectedValue within the custom expression is constant even if I select another value from the dropdown. Why does this occur?
0
9923
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10806
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9544
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7939
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7104
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5773
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5967
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3214
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.