I've found a problem using BACKCOLOR and FONTCOLOR in an EDITBOX control when it's READONLY.
Code: Select all
#include "minigui.ch"
FUNCTION main()
DEFINE WINDOW p000win ;
ROW 0 ;
COL 0 ;
WIDTH 800 ;
HEIGHT 600 ;
TITLE 'EditBox BackColor' ;
WINDOWTYPE MAIN ;
FONT "Arial" ;
SIZE 12 ;
BACKCOLOR {153, 204, 204}
DEFINE MAIN MENU
DEFINE POPUP '&File'
MENUITEM 'e&Xit' ACTION p000_exit()
END POPUP
END MENU
DEFINE EDITBOX ed_ques1
PARENT p000win
ROW 40
COL 20
WIDTH 500
HEIGHT 100
FONTNAME "Arial"
FONTSIZE 12
FONTBOLD .T.
TOOLTIP "this it's editable"
BACKCOLOR {153, 204, 204}
FONTCOLOR {0, 51, 204}
TABSTOP .F.
VALUE "this it's editable and"+hb_osnewline()+"BACKCOLOR and FONTCOLOR colors" + hb_osnewline() + "are correct"
READONLY .F.
VSCROLLBAR .T.
HSCROLLBAR .T.
END EDITBOX
DEFINE EDITBOX ed_ques2
PARENT p000win
ROW 200
COL 20
WIDTH 500
HEIGHT 100
FONTNAME "Arial"
FONTSIZE 12
FONTBOLD .T.
TOOLTIP "this it's NOT editable"
BACKCOLOR {153, 204, 204}
FONTCOLOR {0, 51, 204}
TABSTOP .F.
VALUE "this it's NOT editable and"+hb_osnewline()+"BACKCOLOR and FONTCOLOR colors" + hb_osnewline() + "are wrong"
READONLY .T.
VSCROLLBAR .T.
HSCROLLBAR .T.
END EDITBOX
END WINDOW
p000win.Center
p000win.Activate
RETURN NIL
/****************************************************************
* Exit function
****************************************************************/
STATIC FUNCTION p000_Exit()
ReleaseAllWindows()
RETURN NIL
Bye.