sagulnet / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 0 forks source link

Suggested enhancement to allow left or right alignment of GEToolStrip items #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I wanted to line up my tool strip items on the right.  I implemented a 
property (toolStipItemsAligment) in GEToolStrip.cs to enable this feature.  I 
wanted to share this work as I think it is a nice feature and has a somewhat 
unique solution.  Attached are my local copies of GEToolStrip.cs and 
GEToolStrip.Designer.cs

Original issue reported on code.google.com by joe.wake...@gmail.com on 28 Apr 2010 at 8:13

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, thanks for the input I will take a look through and will probably add this 
to the 
next commit. Many thanks for sharing this. Fraser.

Original comment by fraser.c...@gmail.com on 2 Jun 2010 at 9:00

GoogleCodeExporter commented 8 years ago

Original comment by fraser.c...@gmail.com on 2 Jun 2010 at 9:00

GoogleCodeExporter commented 8 years ago
I really like the implementation. Only one niggle is that the Cursor rapidly 
flashes from an arrow to a hand as it moves. I'm using win 7 64 bit with latest 
google earth.

Original comment by Glenn...@googlemail.com on 13 Oct 2010 at 8:44

GoogleCodeExporter commented 8 years ago
@Glenn - not really sure what you mean - when and where does the cursor 
flash/change? Also, could you open a new bug report for this please?

http://code.google.com/p/winforms-geplugin-control-library/issues/entry?template
=Defect%20report%20from%20user

Thanks 

Original comment by fraser.c...@gmail.com on 8 Oct 2011 at 12:53

GoogleCodeExporter commented 8 years ago
@Glenn - I think I actually reproduced this and have also found a fix. Enabling 
double buffering on the GEWebBrowser control and also disabling the default 
cursor via css seem to resolve the issue. 

@Joe - I have added this finally, although I made it a little more generic so 
that it does not need altering if the items change. Like so:

----------------------------------------------------------
private System.Windows.Forms.ToolStripItemAlignment toolStripItemAlignment;

public ToolStripItemAlignment ToolStripItemAlignment
{
    get { return this.toolStripItemAlignment; }
    set
    {
        if (this.toolStripItemAlignment != value)
        {
            this.toolStripItemAlignment = value;
            this.ToggleAlignment();
        }
    }
}

private void ToggleAlignment()
{
    List<ToolStripItem> list = new List<ToolStripItem>();
    foreach (ToolStripItem item in this.Items)
    {
        item.Alignment = toolStripItemAlignment;
        list.Add(item);
    }
    this.Items.Clear();
    list.ForEach(delegate(ToolStripItem i) 
    { 
        this.Items.Add(i);
    });
}
----------------------------------------------------------

Many thanks again for both of your inputs!

F

Original comment by fraser.c...@gmail.com on 11 Feb 2012 at 12:00