Antonio Linares wrote:Joao,
Joaoalpande wrote:Bom dia,
Tem como fazer uma pesquisa , exemplo pesquisar o metrobutton que tem nClrCaption :="Nome Teste" e dar o focus nesse metrobutton , o metropanel deslizar para esse metrobutton?
Cumprimentos
João Alpande
Please post a screenshot or an example to test here. I don't understand what you mean, thanks
I need to create a button where the user types the name of the wine , then metropanel should slide until this button is positioned in the registry that researched , excuse my English I am using translator.
Code: Select all
FUNCTION ShowRecords( NREC,oWnd,OMETRO )
local oMetro2, oBtn, oFont, oHScroll,oBtn1,oBtn2,oBt:={}
oMetro:Hide()
IF FILE( c_Path + "F_ART.DBF" )
DBSELECTAREA( 2)
NET_USE (c_Path + "F_ART.DBF", 3,.T.)
INDEX ON 2->C_des TO f_art
ELSE
MSGALERT("ARQUIVO ARTIGOS INEXISTENTE","Atenção")
ENDIF
DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, -30 BOLD
DEFINE METROPANEL oMetro2 OF oWnd TITLE "VINHOS" ;
COLOR RGB( 0, 0,64 ), RGB( 0, 0,64)
D_BACKGRD( oMetro2, 4, , , , , , c_path1 + "vinho3.Jpg" )
oMetro2:lDesignMode := .T.
oMetro2:nMetroTop = 120
oMetro2:nMetroMargin = 20
oMetro2:nBtnSize = 150
oMetro2:nSliderTop = 120
oWnd:bMouseWheel = { | nKey, nDelta, nXPos, nYPos | oMetro2:MouseWheel( nKey, nDelta, nXPos, nYPos ) }
DEFINE METROBUTTON oBtn OF oMetro2 ;
COLOR CLR_WHITE,RGB( 255, 0, 0 ) ;
GROUP 2 ;
BITMAP C_Path1+ "back-black-48.png" ;
BMPALIGN "MIDDLECENTER" ;
LARGE;
ACTION (NET_CLOSE ( 3,5,.T.),oMetro2:Hide(), oMetro:Show())
DBSELECTAREA(2)
SET FILTER TO val((2)->C_CODREG)=nRec
DBGOTOP(2)
WHILE !EOF()
IF !EMPTY( 2->C_DES)
DEFINE METROBUTTON oBtn OF oMetro2 ;
PROMPT oemtoansi(2->C_DES);
COLOR CLR_WHITE,CLR_RED ;
ALIGN "MIDDLECENTER" ;
FONT oFontSmall2 ;
BODYTEXT "Preço "+str(2->c_pvp,6,2) ;
TEXTALIGN "BOTTOMCENTER" ;
large;
ACTION Detalhe(::Cargo,oWnd )
oBtn:Cargo := RecNo()
ENDIF
DbSkip()
END
DEFINE METROBUTTON oBtn OF oMetro2 ;
COLOR CLR_WHITE,RGB( 255, 0, 0 ) ;
GROUP 2 ;
BITMAP C_Path1+ "back-black-48.png" ;
BMPALIGN "MIDDLECENTER" ;
LARGE;
ACTION (NET_CLOSE ( 3,5,.T.),oMetro2:Hide(), oMetro:Show())
oMetro2:Show()
RETURN NIL