Click here to Skip to main content
15,899,937 members
Home / Discussions / C#
   

C#

 
GeneralRe: Execute User written Code Pin
Ketty Avashia10-Jul-07 11:32
Ketty Avashia10-Jul-07 11:32 
GeneralRe: Execute User written Code Pin
PhilDanger11-Jul-07 2:58
PhilDanger11-Jul-07 2:58 
GeneralRe: Execute User written Code Pin
Ketty Avashia11-Jul-07 5:34
Ketty Avashia11-Jul-07 5:34 
AnswerRe: Execute User written Code Pin
Cyrilix11-Jul-07 8:28
Cyrilix11-Jul-07 8:28 
Questionquestion??? Pin
sarvenaz8410-Jul-07 8:47
sarvenaz8410-Jul-07 8:47 
AnswerRe: question??? Pin
Christian Graus10-Jul-07 9:06
protectorChristian Graus10-Jul-07 9:06 
Questionjfo's Splitbutton... Pin
Faredegyn10-Jul-07 8:12
Faredegyn10-Jul-07 8:12 
QuestionRe: jfo's Splitbutton... Pin
Faredegyn11-Jul-07 3:24
Faredegyn11-Jul-07 3:24 
Ok let's try this again...

(sorry if this violates some sort of double post law)

<<designer class="">>

<br />
this.splitButton.ContextMenuStrip = new<br />
System.Windows.Forms.ContextMenuStrip();<br />
this.splitButton.ContextMenuStrip.Items.Add("Item1");<br />
this.splitButton.ContextMenuStrip.Items.Add("Item2");<br />
this.splitButton.ContextMenuStrip.Items.Add("Item3");<br />
<br />
<br />
this.splitButton.Click += new System.EventHandler(this.cmdSplitButton_Click);<br />

<>

<<splitbutton class="">>

<br />
        protected override void OnMouseUp(MouseEventArgs mevent)<br />
        {<br />
            if (!showSplit)<br />
            {<br />
                base.OnMouseUp(mevent);<br />
                return;<br />
            }<br />
<br />
            if (mevent.Button == MouseButtons.Right)<br />
            {<br />
                ShowContextMenuStrip();<br />
            }<br />
            else if (m_SplitMenu == null || !m_SplitMenu.Visible)<br />
            {<br />
                SetButtonDrawState();<br />
<br />
                if (Bounds.Contains(Parent.PointToClient(Cursor.Position)) && !dropDownRectangle.Contains(mevent.Location))<br />
                {<br />
                    OnClick(new EventArgs());<br />
                }<br />
            }<br />
        }<br />


<>

<>

<br />
private void cmdSvAllImg_Click(object sender, EventArgs e)<br />
{<br />
}<br />


<>

My question is what do I need to do so that when the button is clicked, it does an action that corresponds with the selection of the splitbutton (e.g if the user selected Item1, it would do an Item1 specific job, and Item2 selection would do an Item2 job)

If any other info is needed, just let me know. The splitButton class can be downloaded at http://wyday.com/files/SplitButton.zip

Thank you again,

Anthony Novak
QuestionC# Having the Font resize accordingly with the label and the form it is in. Pin
Minosknight10-Jul-07 7:12
Minosknight10-Jul-07 7:12 
AnswerRe: C# Having the Font resize accordingly with the label and the form it is in. Pin
Christian Graus10-Jul-07 7:15
protectorChristian Graus10-Jul-07 7:15 
GeneralRe: C# Having the Font resize accordingly with the label and the form it is in. Pin
Minosknight10-Jul-07 7:18
Minosknight10-Jul-07 7:18 
GeneralRe: C# Having the Font resize accordingly with the label and the form it is in. Pin
Christian Graus10-Jul-07 7:32
protectorChristian Graus10-Jul-07 7:32 
QuestionHow to trap unhandled exceptions Pin
Glenn E. Lanier II10-Jul-07 6:45
Glenn E. Lanier II10-Jul-07 6:45 
AnswerRe: How to trap unhandled exceptions Pin
Christian Graus10-Jul-07 6:59
protectorChristian Graus10-Jul-07 6:59 
GeneralRe: How to trap unhandled exceptions Pin
Glenn E. Lanier II10-Jul-07 7:57
Glenn E. Lanier II10-Jul-07 7:57 
GeneralRe: How to trap unhandled exceptions Pin
Christian Graus10-Jul-07 8:11
protectorChristian Graus10-Jul-07 8:11 
GeneralRe: How to trap unhandled exceptions Pin
Glenn E. Lanier II10-Jul-07 10:14
Glenn E. Lanier II10-Jul-07 10:14 
AnswerRe: How to trap unhandled exceptions Pin
Daniel Grunwald10-Jul-07 8:17
Daniel Grunwald10-Jul-07 8:17 
GeneralRe: How to trap unhandled exceptions Pin
Glenn E. Lanier II10-Jul-07 10:16
Glenn E. Lanier II10-Jul-07 10:16 
QuestionDataGridView Pin
mehrdadc4810-Jul-07 6:45
mehrdadc4810-Jul-07 6:45 
AnswerRe: DataGridView Pin
rahvyn610-Jul-07 9:40
rahvyn610-Jul-07 9:40 
QuestionNewbie: Calling an overriden method from a child class... Pin
Phillip Hodges10-Jul-07 5:17
Phillip Hodges10-Jul-07 5:17 
AnswerRe: Newbie: Calling an overriden method from a child class... Pin
Colin Angus Mackay10-Jul-07 5:19
Colin Angus Mackay10-Jul-07 5:19 
GeneralRe: Newbie: Calling an overriden method from a child class... Pin
Phillip Hodges10-Jul-07 5:32
Phillip Hodges10-Jul-07 5:32 
AnswerRe: Newbie: Calling an overriden method from a child class... Pin
J4amieC10-Jul-07 5:32
J4amieC10-Jul-07 5:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.