create an “ ObjectInspector” for Fivewin.
Regards,
Otto
- Code: Select all Expand view RUN
function objectInspector(cObjName,coWnd, nTop, nLeft, nBottom, nRight, cTitle, nStyle, oMenu, oBrush, oIcon,;
oParent, lVScroll, lHScroll, nClrFore, nClrBack, oCursor, cBorder, lSysMenu,;
lCaption, lMin, lMax, lPixel)
local oWndlocal, oBrw
local aData := { { "DEFINE WINDOW", "<oWnd>", EDIT_GET },;
{ "PIXEL" , "result", EDIT_BUTTON, { || MsgYesNo( "Select a value" ) } },;
{ "FROM Top", "<nTop>", EDIT_GET },;
{ "FROM Left", "<nLeft>", EDIT_GET },;
{ "FROM Bottom", "<nBottom>", EDIT_GET },;
{ "FROM Right", "<nRight>" , EDIT_GET },;
{ "TITLE", "<cTitle>", EDIT_GET },;
{ "COLOR nClrFore", "<nClrFore>", EDIT_GET },;
{ "COLOR nClrBack", "<nClrBack>", EDIT_GET },;
{ "OF", "<oParent>", EDIT_GET },;
{ "BRUSH", "<oBrush>", EDIT_GET },;
{ "CURSOR", "<oCursor>", EDIT_GET },;
{ "ICON", "<oIcon>", EDIT_GET },;
{ "MENU", "<oMenu>", EDIT_GET },;
{ "STYLE", "<nStyle>", EDIT_GET },;
{ "BORDER", "result", EDIT_LISTBOX, {"NONE", "SINGLE"} },;
{ "NOSYSMENU", "NO SYSMENU", EDIT_BUTTON, { || MsgYesNo( "Select a value" ) } },;
{ "NOCAPTION", "NO CAPTION", EDIT_BUTTON, { || MsgYesNo( "Select a value" ) } },;
{ "NOICONIZE", "NOMINIMIZE", EDIT_BUTTON, { || MsgYesNo( "Select a value" ) } },;
{ "NOZOOM", "NOMAXIMIZE", EDIT_BUTTON, { || MsgYesNo( "Select a value" ) } },;
{ "VSCROLL", "VERTICAL", EDIT_BUTTON, { || MsgYesNo( "Select a value" ) } },;
{ "HSCROLL", "HORIZONTAL", EDIT_BUTTON, { || MsgYesNo( "Select a value" ) } } }
DEFAULT nTop := 2, nLeft := 2, nBottom := 20, nRight := 70,;
lVScroll := .f., lHScroll := .f.,;
nClrFore := GetSysColor( COLOR_WINDOWTEXT ),;
nClrBack := GetSysColor( COLOR_WINDOW ),;
nStyle := 0,;
cBorder := "SINGLE", lSysMenu := .t., lCaption := .t.,;
lMin := .t., lMax := .t., lPixel := .f., cTitle := "..."
aData[1,2] := coWnd
aData[2,2] := lPixel
aData[3,2] := nTop
aData[4,2] := nLeft
aData[5,2] := nBottom
aData[6,2] := nRight
aData[7,2] := cTitle
aData[8,2] := nClrFore
aData[9,2] := nClrBack
aData[10,2] := oParent
aData[11,2] := oBrush
aData[12,2] := oCursor
aData[13,2] := oIcon
aData[14,2] := oMenu
aData[15,2] := nStyle
aData[16,2] := cBorder
aData[17,2] := lSysMenu
aData[18,2] := lCaption
aData[19,2] := lMin
aData[20,2] := lMax
aData[21,2] := lVScroll
aData[22,2] := lHScroll