Click here to Skip to main content
15,879,082 members
Home / Discussions / C#
   

C#

 
AnswerRe: Strange bug when converting from binary to decimal.. Pin
Richard Andrew x6416-Feb-14 11:25
professionalRichard Andrew x6416-Feb-14 11:25 
GeneralRe: Strange bug when converting from binary to decimal.. Pin
Alex Reed17-Feb-14 14:01
Alex Reed17-Feb-14 14:01 
AnswerRe: Strange bug when converting from binary to decimal.. Pin
Richard MacCutchan16-Feb-14 22:40
mveRichard MacCutchan16-Feb-14 22:40 
GeneralRe: Strange bug when converting from binary to decimal.. Pin
Richard Deeming17-Feb-14 1:54
mveRichard Deeming17-Feb-14 1:54 
GeneralRe: Strange bug when converting from binary to decimal.. Pin
Richard MacCutchan17-Feb-14 3:01
mveRichard MacCutchan17-Feb-14 3:01 
GeneralRe: Strange bug when converting from binary to decimal.. Pin
Alex Reed17-Feb-14 14:00
Alex Reed17-Feb-14 14:00 
GeneralRe: Strange bug when converting from binary to decimal.. Pin
Richard MacCutchan17-Feb-14 21:12
mveRichard MacCutchan17-Feb-14 21:12 
Questiontabcontrol OwnerDrawFixed right to left in c# Pin
Member 1059114816-Feb-14 1:39
Member 1059114816-Feb-14 1:39 
I wanted to add X button for each tab. The drawMode is OwnerDrawFixed. it works fine if it left to right. Once I allow RightToLeftLayout = true and RightToLeft = true, it does not look good because that he still adds the string from left to right, while that tab add from right to left.

How do I make it that string will also be right to left?

Thanks.

C#
private void addCloseButton(object sender, DrawItemEventArgs e)
{
    //This code will render a "x" mark at the end of the Tab caption.
    e.Graphics.DrawString("x", e.Font, Brushes.Black, e.Bounds.Right - 15 , e.Bounds.Top +4 );
    e.Graphics.DrawString(this.tabControl1.TabPages[e.Index].Text, e.Font, Brushes.Black, e.Bounds.Left+4, e.Bounds.Top+4);
    e.DrawFocusRectangle();

}

private void actionClose(object sender, MouseEventArgs e)
{
    //Looping through the controls.
    for (int i = 0; i < this.tabControl1.TabPages.Count; i++)
    {
        Rectangle r = tabControl1.GetTabRect(i);
        //Getting the position of the "x" mark.
        Rectangle closeButton = new Rectangle(r.Right - 15, r.Top + 4, 12, 10);
        if (closeButton.Contains(e.Location))
        {
            if (MessageBox.Show("?האם אתה רוצה לסגור טאב זה", "אישור", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                this.tabControl1.TabPages.RemoveAt(i);
                break;
            }
        }
    }

}

QuestionHow to Open form inside existing Tab Page Pin
Member 1059114816-Feb-14 1:36
Member 1059114816-Feb-14 1:36 
AnswerRe: How to Open form inside existing Tab Page Pin
Member 1059114816-Feb-14 8:33
Member 1059114816-Feb-14 8:33 
QuestionRe: How to Open form inside existing Tab Page Pin
Ravi Bhavnani17-Feb-14 7:54
professionalRavi Bhavnani17-Feb-14 7:54 
Questionhello sir... for com port setting for sms application in c# Pin
aawajaarughat15-Feb-14 23:18
professionalaawajaarughat15-Feb-14 23:18 
AnswerRe: hello sir... for com port setting for sms application in c# Pin
Kornfeld Eliyahu Peter15-Feb-14 23:31
professionalKornfeld Eliyahu Peter15-Feb-14 23:31 
AnswerRe: hello sir... for com port setting for sms application in c# Pin
OriginalGriff15-Feb-14 23:32
mveOriginalGriff15-Feb-14 23:32 
QuestionTrying to make a converter Pin
daddy35615-Feb-14 14:01
daddy35615-Feb-14 14:01 
AnswerRe: Trying to make a converter Pin
Richard Andrew x6415-Feb-14 17:26
professionalRichard Andrew x6415-Feb-14 17:26 
GeneralRe: Trying to make a converter Pin
Mycroft Holmes15-Feb-14 20:41
professionalMycroft Holmes15-Feb-14 20:41 
GeneralRe: Trying to make a converter Pin
harold aptroot15-Feb-14 23:52
harold aptroot15-Feb-14 23:52 
GeneralRe: Trying to make a converter Pin
harold aptroot15-Feb-14 23:50
harold aptroot15-Feb-14 23:50 
GeneralRe: Trying to make a converter Pin
daddy35617-Feb-14 11:49
daddy35617-Feb-14 11:49 
GeneralRe: Trying to make a converter Pin
harold aptroot17-Feb-14 21:30
harold aptroot17-Feb-14 21:30 
GeneralRe: Trying to make a converter Pin
daddy35618-Feb-14 0:27
daddy35618-Feb-14 0:27 
GeneralRe: Trying to make a converter Pin
harold aptroot18-Feb-14 0:42
harold aptroot18-Feb-14 0:42 
GeneralRe: Trying to make a converter Pin
daddy35618-Feb-14 4:03
daddy35618-Feb-14 4:03 
GeneralRe: Trying to make a converter Pin
harold aptroot18-Feb-14 4:37
harold aptroot18-Feb-14 4:37 

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.