473,408 Members | 1,601 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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.DrawScrollButton(e.Graphics,
button2.ClientRectangle,ScrollButton.Down,
ButtonState.Normal)

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

Thanks
Nov 15 '05 #1
2 5933
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.DrawScrollButton(e.Graphics,
button2.ClientRectangle,ScrollButton.Down,
ButtonState.Normal)

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.EnableVisualStyles( );

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

Fabio Cavalcante

"Vijaye Raji" <no************@hotmail.com> wrote in message
news:#j**************@TK2MSFTNGP11.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.DrawScrollButton(e.Graphics,
button2.ClientRectangle,ScrollButton.Down,
ButtonState.Normal)

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
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,...
2
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...
4
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
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...
0
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...
0
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...
0
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...
11
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...
2
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 =...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...
0
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...

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.