1 // Written by Christopher E. Miller 2 // See the included license.txt for copyright and license details. 3 4 5 6 module dfl.panel; 7 8 private import dfl.control, dfl.base, dfl.internal.winapi; 9 10 11 12 class Panel: ContainerControl { // docmain 13 14 @property void borderStyle(BorderStyle bs) { // setter 15 final switch(bs) { 16 case BorderStyle.FIXED_3D: 17 _style(_style() & ~WS_BORDER); 18 _exStyle(_exStyle() | WS_EX_CLIENTEDGE); 19 break; 20 21 case BorderStyle.FIXED_SINGLE: 22 _exStyle(_exStyle() & ~WS_EX_CLIENTEDGE); 23 _style(_style() | WS_BORDER); 24 break; 25 26 case BorderStyle.NONE: 27 _style(_style() & ~WS_BORDER); 28 _exStyle(_exStyle() & ~WS_EX_CLIENTEDGE); 29 break; 30 } 31 32 if(created) { 33 redrawEntire(); 34 } 35 } 36 37 /// ditto 38 @property BorderStyle borderStyle() { // getter 39 if(_exStyle() & WS_EX_CLIENTEDGE) { 40 return BorderStyle.FIXED_3D; 41 } else if(_style() & WS_BORDER) { 42 return BorderStyle.FIXED_SINGLE; 43 } 44 return BorderStyle.NONE; 45 } 46 47 48 this() { 49 //ctrlStyle |= ControlStyles.SELECTABLE | ControlStyles.CONTAINER_CONTROL; 50 ctrlStyle |= ControlStyles.CONTAINER_CONTROL; 51 /+ wstyle |= WS_TABSTOP; +/ // Should WS_TABSTOP be set? 52 //wexstyle |= WS_EX_CONTROLPARENT; // Allow tabbing through children. ? 53 } 54 } 55