In the old application when a user clicked on an umbrella, the image remained the same size,
but now the image becomes smaller, how can I get back to the same configuration that I had before?
#include "fivewin.ch"
#include "constant.ch"
#define OMB_W 50
#define OMB_H 50
#define COLOR_BEACH nRGB(255,221,187)
Function Test()
Local oDlg
local nBottom := 48.6
local nRight :=99
local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
local nHeight := nBottom * DLG_CHARPIX_H
local oPanel
Local oBrush1
DEFINE BRUSH oBrush1 COLOR COLOR_BEACH
DEFINE DIALOG oDlg SIZE nWidth, nHeight ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME ) ;
TITLE "test"
ACTIVATE DIALOG oDLG ;
ON INIT (oPanel:=CreatePanelTouch2( oDlg,oBrush1),;
Load_Btn(oPanel),;
oPanel:SetRange() ,;
oPanel:CheckResize() )
//------------------------------------------------------//
Function Load_BTN(oDlg)
Local nx:=1,ny:=1,numero:=OMB_W
Local abtn:= array(10)
Local nElemento:=1
@ ny*numero, nx*numero-20 BTNBMP aBtn[ nElemento ] ;
RESOURCE "c:\work\fwh\bitmaps\pngs\image5.png";
SIZE OMB_H,OMB_W PIXEL OF oDlg ;
FLAT TOP COLOR CLR_WHITE,CLR_GREEN NOBORDER ;
ACTION ( ::oPopup := { |oBtn| BtnPopMenu( oBtn ) }, ;
::ShowPopUp(), ;
::oPopup := nil )
aBtn[nElemento]:lTransparent:=.t.
return nil
//----------------------------------------------------------------
Function CreatePanelTouch2( oDlg,oBrush)
local oPanel,oBtn
local nSplit:=0
oDlg:aMinMaxInfo := { nil, nil, nil, nil, 999, 570, nil, nil } //878, 570
oPanel:= TScrollPanel():New( 45,nSplit+5,oDlg:nbottom-5,oDlg:nWidth-5,oDlg, .t. )
oPanel:nRightMargin := 10
oPanel:nBottomMargin := 10
oPanel:SetBrush(oBrush)
return oPanel
//---------------------------------------------------------------//
function BtnPopMenu( oBtn)
MENU oPop POPUP
MENUITEM "some info 1"
MENUITEM " info2"
MENUITEM "info"
ENDMENU
return oPop
but now the image becomes smaller, how can I get back to the same configuration that I had before?
@ 50,50 BTNBMP FILE "\fwh\bitmaps\pngs\image5.png" ;
SIZE 50,50 PIXEL OF oDlg FLAT NOBORDER ;
COLOR CLR_WHITE,CLR_GREEN ;
ACTION ::ShowPopUp( { |oBtn| BtnPopMenu( oBtn ) } )
Silvio.Falconi wrote:thanks now seem run ok with stardard fwh class btnbmp.
probably before there were problems I was shown a black arrow to the right of the button with a vertical line that was not good to view an entire beach because the arrow was located at the end of the button and close to the other and was impractical use, that's why I changed the class.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 44 guests