DrawMode, DrawStyle, DrawWidth
These three properties affect the way drawing occurs on a form (including the main FoxPro window, _SCREEN). DrawMode also affects the drawing of Shape and Line controls.
Usage |
oObject.DrawMode = nDrawMode nDrawMode = oObject.DrawMode |
Usage |
frmForm.DrawStyle = nDrawStyle nDrawStyle = frmForm.DrawStyle |
Finally, Style 6 is labeled as "inside solid," but we can't get it to do anything at all. No matter what settings we specify for related properties, nothing happens. If there's already something there, it stays there. If there's nothing there, nothing appears. We're not sure what this one is supposed to do, but this can't be it. |
Usage |
frmForm.DrawWidth = nDrawWidth nDrawWidth = frmForm.DrawWidth |
Figure 1: Testing drawing parameters.
Example |
* The "Change it" button in the form shown has all * the interesting code in its Click method. * nFormColor and nFillColor are custom properties * of the form that get set by the appropriate buttons. ThisForm.BackColor = ThisForm.nFormColor ThisForm.Shape1.DrawMode = ThisForm.lstMode.ListItemId ThisForm.Shape1.FillColor = ThisForm.nFillColor ThisForm.Shape1.BorderColor = ThisForm.nFillColor ThisForm.Shape1.FillStyle = ThisForm.lstFillStyle.ListItemId-1 ThisForm.DrawMode = ThisForm.lstMode.ListItemId ThisForm.DrawStyle = ThisForm.lstDrawStyle.ListItemId-1 ThisForm.FillColor = ThisForm.nFillColor ThisForm.FillStyle = ThisForm.lstFillStyle.ListItemId-1 * Redraw the box to see the new effects. ThisForm.Box(ThisForm.Shape1.Left, ; ThisForm.Shape1.Top + ThisForm.Shape1.Height + 10,; ThisForm.Shape1.Left + ThisForm.Shape1.Width, ; ThisForm.Shape1.Top + ; (2 * ThisForm.Shape1.Height) + 10) |
See Also |
BackColor, Box, Circle, FillColor, FillStyle, ForeColor, Line Method |