How to create a style for a combobox in c#
-
Hai I developing a software in c# i want to know how to write code for cute comboboxes for windows7. anyone can help me please ? Arunkumar
-
Hai I developing a software in c# i want to know how to write code for cute comboboxes for windows7. anyone can help me please ? Arunkumar
What do you mean by cute comboboxes for windows7?
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
-
What do you mean by cute comboboxes for windows7?
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
Thank you For your replay Richard MacCutchan Please see this link http://www.hv-designs.co.uk/tutorials/sliding_menu/sliding_menu.html[^] Styling combo box like this. Thank you Arunkumar.t
-
Thank you For your replay Richard MacCutchan Please see this link http://www.hv-designs.co.uk/tutorials/sliding_menu/sliding_menu.html[^] Styling combo box like this. Thank you Arunkumar.t
which frontend tech. you are using (WPF, Silverlight , etc.)?
"Insanity is doing the same thing over and over again but expecting different results.” — Rita Mae Brown
-
Thank you For your replay Richard MacCutchan Please see this link http://www.hv-designs.co.uk/tutorials/sliding_menu/sliding_menu.html[^] Styling combo box like this. Thank you Arunkumar.t
That is a web site, so you need to look at the options available within ASP.NET for creating drop down lists. There are lots of articles here on CodeProject that will offer suggestions.
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
-
That is a web site, so you need to look at the options available within ASP.NET for creating drop down lists. There are lots of articles here on CodeProject that will offer suggestions.
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
Thank you for your valuable time I thing u misunderstand my question! iam not looking for a asp.net combo box. i want to integrate that type of combo box in my desktop application. Thank you Arunkumar
-
which frontend tech. you are using (WPF, Silverlight , etc.)?
"Insanity is doing the same thing over and over again but expecting different results.” — Rita Mae Brown
iam using .net as my desktop application framework
-
Thank you for your valuable time I thing u misunderstand my question! iam not looking for a asp.net combo box. i want to integrate that type of combo box in my desktop application. Thank you Arunkumar
I'm not sure Winforms or even WPF allows this kind of theming natively. What you'll need to do is write your own usercontrol that inherits from the standard combobox. I think this usercontrol will consist of several standard controls: - a textbox - a button (that resembles the down arrow) - an invisible panel, size: width = textbox, height = 0 (by default) You then load this panel with the items (via labels or textblocks) and on click of the button the panel grows in size (at the position right below the textbox). When a label/textblock was clicked, the panel is closed again andf the text put in the textbox. hope this helps. PS: Please avoid text speech and mind the spelling (even if you're not native English)
V.
-
Thank you for your valuable time I thing u misunderstand my question! iam not looking for a asp.net combo box. i want to integrate that type of combo box in my desktop application. Thank you Arunkumar
-
Hai I developing a software in c# i want to know how to write code for cute comboboxes for windows7. anyone can help me please ? Arunkumar
-
Hai I developing a software in c# i want to know how to write code for cute comboboxes for windows7. anyone can help me please ? Arunkumar
Some replies here have assumed you are describing "theming:" (even though you never used that word, yourself): where theming means you want to create a control from which you could create any number of different look-and-feel variations from the base control. Looking at your question: and the example on the web page you linked to: are you really asking how to create a custom-themed control, or are you just asking how to make a drop-down that looks and behaves exactly like the one on that web-page ? Please clarify exactly what "style" and "styling" mean to you here. best, Bill
"Last year I went fishing with Salvador Dali. He was using a dotted line. He caught every other fish." Steven Wright
-
I'm not sure Winforms or even WPF allows this kind of theming natively. What you'll need to do is write your own usercontrol that inherits from the standard combobox. I think this usercontrol will consist of several standard controls: - a textbox - a button (that resembles the down arrow) - an invisible panel, size: width = textbox, height = 0 (by default) You then load this panel with the items (via labels or textblocks) and on click of the button the panel grows in size (at the position right below the textbox). When a label/textblock was clicked, the panel is closed again andf the text put in the textbox. hope this helps. PS: Please avoid text speech and mind the spelling (even if you're not native English)
V.
I was thinking the same. :-O
-
I was thinking the same. :-O
-
I'm not sure Winforms or even WPF allows this kind of theming natively. What you'll need to do is write your own usercontrol that inherits from the standard combobox. I think this usercontrol will consist of several standard controls: - a textbox - a button (that resembles the down arrow) - an invisible panel, size: width = textbox, height = 0 (by default) You then load this panel with the items (via labels or textblocks) and on click of the button the panel grows in size (at the position right below the textbox). When a label/textblock was clicked, the panel is closed again andf the text put in the textbox. hope this helps. PS: Please avoid text speech and mind the spelling (even if you're not native English)
V.
ok guys Thanks for your replays Now i am facing another problem
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace Combo
{public class Combo //:IDisposable { private System.Windows.Forms.ComboBox li = new System.Windows.Forms.ComboBox(); //object // public event EventHandler SelectedIndexChanged; //The event handler name must match the event name. // private object\[\] eventObject; //One object\[\] for each event (one event here). public void Addselect(Control FormName, string name, int top, int left, int width, int height, string Text) { li.Top = top; li.Left = left; li.Width = width; li.Height = height; li.Name = name; li.FlatStyle = FlatStyle.Flat; li.CreateGraphics(); li.Text = Text; li.IntegralHeight = false; li.MaxDropDownItems = 5; li.DropDownStyle = ComboBoxStyle.DropDown; li.Size = new System.Drawing.Size(136, 81); li.BackColor = System.Drawing.Color.DarkGray; FormName.Controls.Add(li); // eventObject = new object\[\] { this, "SelectedIndexChanged" }; //This is the object that will pass with the event. //It must be in that format exactly. // li.SelectedIndexChanged += new EventHandler(SelectedIndexChanged);
//
}
// private void SelectedIndexChanged(object sender, EventArgs e)
// {
// if (SelectedIndexChanged != null) //You must test this.
// {
// SelectedIndexChanged(eventObject, null);
// }
// }public void Additems(string\[\] items) { li.Items.AddRange(items); } public bool Enabled { get { return li.Enabled; } set { li.Enabled = value; } } public bool Visible { get { return li.Visible; } set { li.Visible = value; } } }
}
Iam Creating a library for combobox.(iam a newbie to c#) iam using this library for adding many combobox in my form can any one tell me how to create a selectedindexchanged event handler for each combobox i creating? i tried the commented code