Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. OutlookBar

OutlookBar

Scheduled Pinned Locked Moved C#
helpcsharpquestionannouncementvisual-studio
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BLaZiNiX
    wrote on last edited by
    #1

    How can I create an outlook bar in C#, is it very complicate ? BTW i don't know if it's only a problem with my VS .NET version ( I Have full release) but the splitter control seems to have a bug, anybody can help me on this ?

    J 1 Reply Last reply
    0
    • B BLaZiNiX

      How can I create an outlook bar in C#, is it very complicate ? BTW i don't know if it's only a problem with my VS .NET version ( I Have full release) but the splitter control seems to have a bug, anybody can help me on this ?

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      Its going to be as complicated as creating it with any other toolkit :-P What is your problem with the splitter? James Simplicity Rules!

      B 1 Reply Last reply
      0
      • J James T Johnson

        Its going to be as complicated as creating it with any other toolkit :-P What is your problem with the splitter? James Simplicity Rules!

        B Offline
        B Offline
        BLaZiNiX
        wrote on last edited by
        #3

        But how can I create one Outlook Bar ? Splitter = why this control have to be docked somewhere to work ? in VC++ you can place it anywhere on the screen no ? Thanks J :)

        J 1 Reply Last reply
        0
        • B BLaZiNiX

          But how can I create one Outlook Bar ? Splitter = why this control have to be docked somewhere to work ? in VC++ you can place it anywhere on the screen no ? Thanks J :)

          J Offline
          J Offline
          James T Johnson
          wrote on last edited by
          #4

          Creating one is a bit different, but might not be too hard to do. Essentially each pane in the outlook bar consists of a Panel, a Button, and a List View set in Large Icon or Small Icon mode. Instead of a list view you can also create your own control which uses flat buttons instead. Clicking on a button tells the outer-most control that it needs to move the panels above to the top so only the button can be seen, and move the panels beneath the one selected to the bottom (changing the height of the panel so as not to obscure the other buttons). Then resize the panel that was clicked on so that it fills the rest of the area (DockStyle.Fill :)) Off the top of my head anyway :) If I get around to it I may actually write an Outlook Bar component someday :-D MFC differs a bit from .NET because it doesn't have any builtin layout engine. In .NET you get some aspects built in, which is why I think it requires docking. Usually though docking isn't a problem, you just have to figure out the combination of splitters and other controls to get it to look the way you want. James Simplicity Rules!

          B B 2 Replies Last reply
          0
          • J James T Johnson

            Creating one is a bit different, but might not be too hard to do. Essentially each pane in the outlook bar consists of a Panel, a Button, and a List View set in Large Icon or Small Icon mode. Instead of a list view you can also create your own control which uses flat buttons instead. Clicking on a button tells the outer-most control that it needs to move the panels above to the top so only the button can be seen, and move the panels beneath the one selected to the bottom (changing the height of the panel so as not to obscure the other buttons). Then resize the panel that was clicked on so that it fills the rest of the area (DockStyle.Fill :)) Off the top of my head anyway :) If I get around to it I may actually write an Outlook Bar component someday :-D MFC differs a bit from .NET because it doesn't have any builtin layout engine. In .NET you get some aspects built in, which is why I think it requires docking. Usually though docking isn't a problem, you just have to figure out the combination of splitters and other controls to get it to look the way you want. James Simplicity Rules!

            B Offline
            B Offline
            BLaZiNiX
            wrote on last edited by
            #5

            k I think I got it. BTW I have another question :) how can I create a custom control on C#, I search over MSDN but I didn't got good result. The example in the .NET show us how create a user control make from existing control like a panel with 3 buttons and this will be a futur control I can use. But what I want to do it's to create a control by the beginning at the drawing stage or derived an existing one. Do you have good tutorials for this or reference anything which I can use to help me ?? Thanks Again James Jonathan

            J 1 Reply Last reply
            0
            • J James T Johnson

              Creating one is a bit different, but might not be too hard to do. Essentially each pane in the outlook bar consists of a Panel, a Button, and a List View set in Large Icon or Small Icon mode. Instead of a list view you can also create your own control which uses flat buttons instead. Clicking on a button tells the outer-most control that it needs to move the panels above to the top so only the button can be seen, and move the panels beneath the one selected to the bottom (changing the height of the panel so as not to obscure the other buttons). Then resize the panel that was clicked on so that it fills the rest of the area (DockStyle.Fill :)) Off the top of my head anyway :) If I get around to it I may actually write an Outlook Bar component someday :-D MFC differs a bit from .NET because it doesn't have any builtin layout engine. In .NET you get some aspects built in, which is why I think it requires docking. Usually though docking isn't a problem, you just have to figure out the combination of splitters and other controls to get it to look the way you want. James Simplicity Rules!

              B Offline
              B Offline
              Ben Kloosterman
              wrote on last edited by
              #6

              I had a similar problem with a Toolbar - I did not want it locked so I put this in the Constructor after it initializes eg DockStyle.None . This is possible but you can forget about using the designer as it will not understand that the component is no longer docked and other coomponents eg a fill component will overwrite it so I had to use Dock to Bottom for the Fill Panel. Ben

              1 Reply Last reply
              0
              • B BLaZiNiX

                k I think I got it. BTW I have another question :) how can I create a custom control on C#, I search over MSDN but I didn't got good result. The example in the .NET show us how create a user control make from existing control like a panel with 3 buttons and this will be a futur control I can use. But what I want to do it's to create a control by the beginning at the drawing stage or derived an existing one. Do you have good tutorials for this or reference anything which I can use to help me ?? Thanks Again James Jonathan

                J Offline
                J Offline
                James T Johnson
                wrote on last edited by
                #7

                To create your own control simply create a new class and derive from System.Windows.Forms.Control; or in VS.NET choose to add a new item and choose Custom Control from the box. You can then handle the events you want (overriding OnPaint is going to be one of them :)) Here's a simple control that creates a very lightweight label

                using System;
                using System.Drawing;
                using System.Windows.Forms;

                public class LightLabel : System.Windows.Forms.Control
                {
                public LightLabel() : base()
                {
                // Nothing to set here
                }

                public override void OnPaint(PaintEventArgs e)
                {
                Brush textBrush = new SolidBrush(ForeColor);
                Brush background = new SolidBrush(BackColor);

                Graphics g = e.Graphics;
                
                g.FillRectangle(background, Bounds);
                g.DrawString(Text, Font, textBrush, Bounds);
                
                textBrush.Dispose();
                background.Dispose();
                

                }
                }

                I didn't actually compile the code but that is the general idea behind creating your own control. You'll also want to look at the ControlPaint class for lots of cool drawing effects you find on controls (the etched border, drawing a 'disabled' image, etc). If you want to get really fancy with your control you'll need to look at Designers which is something I haven't looked at in-depth yet. James Simplicity Rules!

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups