Click here to Skip to main content
Full site     10M members (36.1K online)    

A Flyout toolbar in C#

 

Introduction 

I looked for a kind of flyout toolbar in csharp. The only article I found is: "Creating Flyout Toolbars".
You can find the article here. But The code is written in C++. So I decided to write my own version in CSharp. 

The principle 

The goal is to have not too many buttons on a toolbar. If you click long enough on a button, a toolbar appears. Simply drag the cursor on the toolbar and select the button of your choice by releasing the mouse button. After that, if you quickly click this button, the corresponding function is being performed. 

How to create a CSFOToolbar 

  Example: 

private void Form1_Load(object sender, EventArgs e)
{
     csfoToolBar1.AddFylout(newToolStripButton, toolStrip1, 0);
     csfoToolBar1.AddFylout(helpToolStripButton, toolStrip2, 0);
}  

Remark: DO NOT create a click event for the button with a flyout toolbar attached in the CSFOToolbar. 

The properties of CSFOToolbar 

Each button with a flyout toolbar is marked with a red triangle in the down right corner. 

·         Corner color: the color of the triangle (default: red), 
·         Corner size: the size in pixel of the triangle (default: 6),   
·         Delay: the time (in ms) before the flyout appears (default: 300ms). 
·         Orientation: define the orientation of the flyout toolbar. Possible values are:

·          Restrict: Restrict the display of the flyout toolbar to the area of the form (default: false) .  

Points of Interest   

Environment   

This class is developed under Visual studio 2005 with the framework 2.0.

References  

History  

  • May 2013: First available version. 





 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search 
Per page   
-- There are no messages in this forum --

Last Updated 13 May 2013 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2013