button bar

button bar

Postby Silvio » Tue Jun 23, 2009 9:50 am

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 ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: button bar

Postby ukoenig » Tue Jun 23, 2009 2:17 pm

Hello Silvio,

I paint a buttonbar by myself, to do this.
There it is possible, to work with different colors.
I don't know, if You like this solution.

The Controls, You asked for ( 2 datapicker, Radio, Get and 2 Buttons ) :
Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: button bar

Postby Silvio » Wed Jun 24, 2009 11:09 am

I inser two date pick
when I inser radio it crash why ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: button bar

Postby ukoenig » Wed Jun 24, 2009 2:03 pm

Silvio,

the solution with a < normal > Buttonbar ( Radio's are not transparent )

Image

If You define the Color with these values, the Radios will have the background from the Buttonbar
@ 1.0, 50 RADIO oRadMenu VAR nValue ITEMS "One", "Two" SIZE 50, 20 OF oBar COLOR 0, RGB( 206, 221, 240 )
( looks like transparent )

Image

Code: Select all  Expand view

#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 )


Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: button bar

Postby Silvio » Thu Jun 25, 2009 8:15 am

Image

I TRY IT BUT
THE SAYS ARE NOT TRASPARENT !!!
THE RADIO CONTROL IS NOT TRASPARENT !!!
HAVE YOU AN IDEA ?

CAN i CREATE RADIO CONTROL ON HORIZONTAL LINE ?

THIS IS THE CODE
Code: Select all  Expand view
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


 
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: button bar

Postby ukoenig » Thu Jun 25, 2009 10:51 am

Silvio,

some adjustments ( tested with screen resolution 1024 x 768 ) :
Because of the Bar-Gradient, try to stay with Your Controls in the vertical center of the Buttonbar.
Keep the SAY-Hight as small as possible.
If You need more space, it has to be adjusted with the Bar-Height.
But maybe Antonio or somebody else knows a solution, to get these controls transparent ?

Image

@ 10,30 SAY oSay[1] PROMPT "DAL" OF oBar COLOR CLR_WHITE,RGB(207,222,244) FONT oFontDATE SIZE 50, 25 PIXEL
@ 0.5,15 DTPICKER dDataIniziale OF oBar SIZE 200,30 FONT oFontDATE

@ 10,300 SAY oSay[2] PROMPT "AL" OF oBar COLOR CLR_WHITE,RGB(207,222,244) FONT oFontDATE SIZE 50, 25 PIXEL
@ 0.5,58 DTPICKER dDataFinale OF oBar SIZE 200,30 FONT oFontDATE VALID dDataIniziale<=dDataFinale

@ 10,560 SAY oSay[3] PROMPT "CLIENTE" OF oBar COLOR CLR_WHITE,RGB(207,222,244) FONT oFontDATE SIZE 250, 25 PIXEL

@ 0.7, 98 RADIO oRadMenu VAR nValue ITEMS "Singola prenotazione", "Multi prenotazione" SIZE 180, 15 OF oBar;
COLOR CLR_WHITE,RGB(213,225,241)
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: button bar

Postby Silvio » Fri Jun 26, 2009 10:11 am

can I inser a radio in to the same line ? on Horizontal and not on vertical line ?

sample: [@] singola prenotazione [@] multiprenotazione

I saw VB and it can insert also an image on the top part of this radio

sample :

IMAGE IMAGE
[] radio control [] radio control


How Create it on fwh ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: button bar

Postby Silvio » Fri Jun 26, 2009 7:18 pm

uwe the color snot run ok
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: button bar

Postby ukoenig » Fri Jun 26, 2009 8:30 pm

Silvio,

A way to get any Color-Values :
( Do You still remember Pixelformer for Alpha-Blended-BMP's ? )

Image

1. Make a Screenshot from the Picture-part, You need a Color.
2. Open the File-Menue of Pixelformer and Import the Image.
3. Use the tool Colorpicker ( a Pen ) from the Toolbar and place it there, where You need the Color-Values.
3. Click on the Color-Display and You get the RGB-values You need.

Pixelformer Download :
http://www.qualibyte.com/

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: button bar

Postby ukoenig » Fri Jun 26, 2009 11:45 pm

Silvio,

A much better Solution :
Colorpicker a very good Application and easy to use. Includes Language-Support.

Just set the Mouse-Pointer on Sreen to the Color You need.
The Area of the Mouse-Pointer is shown in a little Window inside of the program.
Nothing to install or to copy. The Program is shown on top of Your Screen
and You can use it on any Screen-Position You need Color-Informations.
You can zoom the Mouse-Pointer-Area up to 15 times.
With this features, You get exactly the Values You need.
You can choose : HEX, RGB, HTML, HSL and more Formats.

Image

Download from my Website ( 0.3 MB ) :

http://www.pflegeplus.com/fw_downloads/colorpicker.zip

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], jair, nageswaragunupudi and 70 guests