then if I move the dialog to another position I see the border with the right color and this also when I press the btnbmpo to scroll the popup menu
I don't understand why that black edge is formed and I don't know how to remove it
- Code: Select all Expand view RUN
#include "fivewin.ch"
// test btnbmp
Function test()
local oDlg,oBtn
local oFont,oBold
local oCursorBtn :=TCursor():New(,'HAND')
local nWd := GetSysMetrics(0) * .58
local nHt := (GetSysMetrics(1) / 2 ) -20
oFont := TFont():New( "Tahoma", 0, 14,, )
oBold := TFont():New( "Tahoma", 0, 14,,.t. )
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont COLOR CLR_BLACK, RGB( 245,245,235) ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX)
@ 10,550 BTNBMP oBtn ;
NAME "COMBOBMP" ;
SIZE 100, 25 PIXEL ;
PROMPT "testobutton" ;
FONT oFont FLAT RIGHT ;
COLOR CLR_BLACK ,RGB( 245,245,235);
ACTION ::ShowPopUp( { |oBtn,nRow,nCol| oBtnMenu(oBtn) } )
oBtn:bClrGrad = { | lInvert | If( ! lInvert,;
{ { 0.25, RGB( 245,245,235), RGB(250,250,245) },;
{ 0.75, RGB(250,250,245), RGB( 245,245,235) } },;
{ { 0.25, RGB(250,250,245), RGB( 245,245,235) }, ;
{ 0.75, RGB( 245,245,235), RGB(250,250,245) } } ) }
oBtn:nClrBorder := IIF(oBtn:lMOver,RGB( 219, 230, 244),RGB( 219, 230, 244))
oBtn:oCursor:= oCursorBtn
ACTIVATE DIALOG oDlg
RETURN NIL
//--------------------------------------------//
Function oBtnMenu(oBtn)
MENU oMenu POPUP
MenuItem "XXXXXXXXXXXXXXXXX"
MenuItem "XXXXXXXXXXXXXXXXX"
MenuItem "XXXXXXXXXXXXXXXXX"
ENDMENU
return oMen