Re: Paint event of a panel

From: Aaron Smith (thespirit-1-_at_smithcentral.net)
Date: 11/16/04


Date: Tue, 16 Nov 2004 20:36:51 GMT

Bob,

The example that I found on your site is all well and good, but what
about raised 3d borders? I do not want the sunken 3d panel, I want a
raised one. Will it work the same way if I sublcass the panel and set it
through the CreateParams? Again, I'm not doing this in a custom control,
I'm doing it in the standard windows forms panel.

Aaron

Bob Powell [MVP] wrote:
> Firstly, don't draw borders in the paint event. Add a border to the object
> using the window properties or handle the non-client messages correctly.
> Windows Forms Tips and Tricks has information on the first option.
>
> Secondly, ControlPaint is a total cheat because it often draws on the deskop
> window, not the control window. This is why it leaves unwanted traces of
> itself and why you should draw your borders correctly.
>

-- 
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.


Relevant Pages

  • Re: Paint event of a panel
    ... don't draw borders in the paint event. ... using the window properties or handle the non-client messages correctly. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: ada, curses and windows
    ... borders; you have to draw the borders yourself, ... That's what I remember from the two programs I wrote with curses back ... curses that draws the window borders for you, ...
    (comp.lang.ada)
  • Re: clean look
    ... found that their gnome implementation was very clean, uncongested, small borders on windows, smaller icons, smaller tool bars, etc. ... Or kontrol panel tweaks to the ui/look that you KDE users have found useful. ... Window Decoration: ... Appearance & Themes/Window Decorations/Window Decoration ...
    (comp.windows.x.kde)
  • Re: MDI Min Max - still there
    ... Basically think of a form with a Panel docked left, ... the space where the new mdi child form can be displayed is ... the user manually changes the Form1 window size, ... On the child form I set the Min / Maximize buttons to false. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Dynamically creating CDockablePanes
    ... When a CDockablePanel is docked and I hit the 'X' button, the window ... If the panel is in autohide mode and i close it, the panel disapears, ... OnPressClose button should not free ANY resources at all; any resources that must be freed ... If i select Hide, the OnPressCloseButton ...
    (microsoft.public.vc.mfc)

Quantcast