Click here to Skip to main content
15,896,912 members
Home / Discussions / C#
   

C#

 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 11:11
afinnell18-Oct-04 11:11 
GeneralRe: slow listview refresh Pin
Heath Stewart18-Oct-04 11:41
protectorHeath Stewart18-Oct-04 11:41 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 12:03
afinnell18-Oct-04 12:03 
GeneralRe: slow listview refresh Pin
DF_Bandit18-Oct-04 8:16
DF_Bandit18-Oct-04 8:16 
GeneralSplitter & multiple panels Pin
DennisMetz15-Oct-04 6:47
DennisMetz15-Oct-04 6:47 
GeneralRe: Splitter & multiple panels Pin
Stanciu Vlad15-Oct-04 7:42
Stanciu Vlad15-Oct-04 7:42 
GeneralRe: Splitter & multiple panels Pin
DennisMetz15-Oct-04 8:14
DennisMetz15-Oct-04 8:14 
GeneralRe: Splitter & multiple panels Pin
Heath Stewart15-Oct-04 9:02
protectorHeath Stewart15-Oct-04 9:02 
And you definitely don't want to start adding panels for each case, either. This adds a lot of overhead.

The Splitter class has both SplitterMoved and SplitterMoving events you could handle. Do handle these intelligently (i.e., writing intelligent code - not duplicating it) use the same event handler for each splitter and iterate through the splitters to change their size using the appropriate location and/or size properties:
private void resizeYoungerSiblings(object sender, EventArgs e)
{
  Splitter split = sender as Splitter;
  if (split != null)
  {
    int index = Controls.GetChildIndex(split);
    if (index >-1)
    {
      for (int i=index; i<Controls.Count; i++)
      {
        Splitter sibling = Controls[i] as Splitter;
        if (sibling != null)
        {
          // Appropriate resizing code here
        }
      }
    }
  }
}
You don't have to worry about this event handler being called for resizing the other splitters since the event is only fired by mouse events (OnMouseMove calls OnSplitterMoving).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Splitter &amp; multiple panels Pin
DennisMetz15-Oct-04 9:44
DennisMetz15-Oct-04 9:44 
GeneralLittle Help pls Pin
alphanorm15-Oct-04 6:31
alphanorm15-Oct-04 6:31 
GeneralRe: Little Help pls Pin
Brian Nottingham15-Oct-04 6:49
Brian Nottingham15-Oct-04 6:49 
GeneralRe: Little Help pls Pin
alphanorm15-Oct-04 6:55
alphanorm15-Oct-04 6:55 
GeneralDisplaying AOL .art file Pin
cgcrute15-Oct-04 5:05
cgcrute15-Oct-04 5:05 
GeneralRe: Displaying AOL .art file Pin
Heath Stewart15-Oct-04 6:26
protectorHeath Stewart15-Oct-04 6:26 
GeneralRe: Displaying AOL .art file Pin
cgcrute15-Oct-04 6:55
cgcrute15-Oct-04 6:55 
GeneralRe: Displaying AOL .art file Pin
Heath Stewart15-Oct-04 7:05
protectorHeath Stewart15-Oct-04 7:05 
GeneralRe: Displaying AOL .art file Pin
cgcrute15-Oct-04 7:20
cgcrute15-Oct-04 7:20 
GeneralRe: Displaying AOL .art file Pin
cgcrute11-Apr-05 11:04
cgcrute11-Apr-05 11:04 
GeneralRe: Displaying AOL .art file Pin
Heath Stewart12-Apr-05 8:15
protectorHeath Stewart12-Apr-05 8:15 
GeneralRe: Displaying AOL .art file Pin
cgcrute12-Apr-05 8:37
cgcrute12-Apr-05 8:37 
Generalconstant WM_PAINT messages Pin
jcl55515-Oct-04 5:00
jcl55515-Oct-04 5:00 
GeneralRe: constant WM_PAINT messages Pin
Stanciu Vlad15-Oct-04 5:11
Stanciu Vlad15-Oct-04 5:11 
GeneralRe: constant WM_PAINT messages Pin
jcl55515-Oct-04 5:49
jcl55515-Oct-04 5:49 
GeneralRe: constant WM_PAINT messages Pin
Brian Nottingham15-Oct-04 6:45
Brian Nottingham15-Oct-04 6:45 
GeneralRe: constant WM_PAINT messages Pin
Heath Stewart15-Oct-04 6:31
protectorHeath Stewart15-Oct-04 6:31 

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.