I need to insert on a buttonbat these control s
two datepick
one get
one radiomenu with two option
e two button
it is possible ?
#include "FiveWin.ch"
#include "Image.ch"
#include "dtpicker.ch"
STATIC oWnd, hDC
STATIC oButtFont
FUNCTION MAIN()
LOCAL oBar, oImage
c_path := CURDRIVE() + ":\" + GETCURDIR() + "\"
SetBalloon( .T. ) // Balloon shape required for tooltips
oButtFont := TFont():New("Arial", ,-14,.F.,.F. , , , ,.F. )
DEFINE WINDOW oWnd TITLE "Bar-Test" ;
MDI MENU TMenu():New()
DEFINE BUTTONBAR oBar OF oWnd SIZE 110, 100 2007 TOP
SET MESSAGE OF oWnd TO "Bar-Test" ;
CENTERED CLOCK KEYBOARD 2007
@ 0, 0 IMAGE oImage SIZE 150, 150 OF oWnd ADJUST
oImage:Progress( .f. )
oImage:LoadBmp( c_path + "FANTASY.JPG" )
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT ( oWnd:SetFont(oButtFont), B_BAR( oWnd, oBar ) ) ;
ON PAINT ( DRAWBITMAP( hdc, oImage:hbitmap, 0, 0,; // background-Image
oWnd:nWidth(), oWnd:nHeight()) )
oButtFont:End()
RETURN NIL
// ------------------------------
FUNCTION B_BAR( oWnd, obar )
LOCAL oBtn1, oBtn2
Local dInit :=date()
Local dEnd :=date()
Local cText := "This is a Get"
Local oRadMenu, nValue := 1
*two datepick
*one get
*one radiomenu with two option
*e two button
@ 1.0, 3 DTPICKER dINIT of oBar SIZE 120, 25
@ 1.0, 30 DTPICKER dEND of oBar SIZE 120, 25
// COLOR "GR+/B"
@ 1.0, 50 RADIO oRadMenu VAR nValue ITEMS "One", "Two" SIZE 50, 20 OF oBar
AEval( oRadMenu:aItems, { | oRad | oRad:lTransparent := .T. } )
@ 1.2, 55 GET cText OF oBar SIZE 120, 25
@ 10, 600 BTNBMP oBtn1 OF oBar 2007 ;
SIZE 100, 70 ;
FILENAME c_path + "\system\format.bmp" ;
PROMPT "Pictures" ;
FONT oButtFont ;
ACTION MsgAlert( "Button 1","Attention" )
oBtn1:lTransparent = .t.
oBtn1:cTooltip := "Pictures"
@ 10, 750 BTNBMP oBtn2 OF oBar 2007 ;
SIZE 100, 70 ;
FILENAME c_path + "\system\stop.bmp" ;
PROMPT "Close" ;
FONT oButtFont ;
ACTION ( oWnd:End() )
oBtn2:lTransparent = .t.
oBtn2:cTooltip := "Close"
RETURN( NIL )
Static Function Barra2()
lOCAL oFontDATE,oSay[3]
local nValue := 1, oRadMenu
Local oBtn1,cText:=SPACE(60)
DEFINE FONT oFontDATE NAME "Verdana" SIZE 0,-20 BOLD
DEFINE BUTTONBAR oApp:oBarDate SIZE 80,60 OF oApp():oWndMain 2007
@ 10,100 SAY oSay[1] PROMPT "DAL" OF oApp:oBarDate COLOR CLR_WHITE,RGB(206,221,240) FONT oFontDATE SIZE 50, 30 PIXEL
@ 10,420 SAY oSay[2] PROMPT "AL" OF oApp:oBarDate COLOR CLR_WHITE,RGB(206,221,240) FONT oFontDATE SIZE 50, 30 PIXEL
@ 10,720 SAY oSay[3] PROMPT "CERCA CLIENTE" OF oApp:oBarDate COLOR CLR_WHITE,RGB(206,221,240) FONT oFontDATE SIZE 250, 30 PIXEL
@ 0.5,25 DTPICKER dDataIniziale OF oApp:oBarDate SIZE 200,30 FONT oFontDATE
@ 0.5,80 DTPICKER dDataFinale OF oApp:oBarDate SIZE 200,30 FONT oFontDATE VALID dDataIniziale<=dDataFinale
* ON CHANGE (oAPP:oDlg:UPDATE(),oAPP:oDlg:REFRESH() ) VALID dDataIniziale<=dDataFinale
@ 1.0, 150 RADIO oRadMenu VAR nValue ITEMS "Singola prenotazione", "Multi prenotazione" SIZE 180, 15 OF oApp:oBarDate;
COLOR CLR_WHITE,RGB(206,221,240)
AEval( oRadMenu:aItems, { | oRad | oRad:lTransparent := .T. } )
@ 1.2,115 GET cText OF oApp:oBarDate SIZE 120, 25
@ 2, 1300 BTNBMP oBtn1 OF oApp:oBarDate 2007 SIZE 100, 50 NAME "XP_EXIT2" ;
PROMPT "Uscita" FONT oFontDATE ACTION (oApp:oBarDate:END(),oApp():oDlg:End(), oApp():oBar:show() )
oBtn1:lTransparent = .t.
oBtn1:cTooltip := "Uscita"
Return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], wartiaga and 92 guests