A preview on the BAR-Tools Version 3b ( + download )

A preview on the BAR-Tools Version 3b ( + download )

Postby ukoenig » Sun Aug 10, 2008 12:42 pm

Hello,

Many functions added to the Bar-tools

Thanks to < nageswaragunupudi >
for his help on bar-gradient-color-change at runtime.

The 3. gradient-color is full supported.
( A extra slider and the 3. color for the mouse added )

Now it is possible, to create very nice looking bar-gradients.

Image

Maybe it is possible to do a color-change just for the selected button ?

Image

It is possible to define a TOP and RIGHT-buttonbar together.
When you like to do this, you have to define a "BLIND" - button
( like shown in the picture ) for the top / right-position,
otherwise the 1. button on the righthand side is not activated.

Image


Regards
Uwe :lol:
Last edited by ukoenig on Tue Aug 12, 2008 8:45 am, edited 1 time in total.
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

Download Bartools 3a

Postby ukoenig » Mon Aug 11, 2008 10:17 am

Hello,

Here is the download with all new functions
For help, just click on the title-buttons.
The project-handling and font-using
will come with the final release ( after FWH 8.08 ).
Color-changing at runtime for the buttons works fine now,
but i have still to look at the font-color.

What is new :
Sliders for Color-move and Button-zize added.
3. Color for rollover added.
Titels changed in buttons ( used as Info / help )
Color-adjust of the button-bar in the main-dialog,
after closing the test-dialog.
Font-selection added.

Image

Download :

http://www.pflegeplus.com/fw_downloads/Bargradient3.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

Re: Download Bartools 3a

Postby Patrick Mast » Mon Aug 11, 2008 10:50 am

Nice work Uwe! ;-)

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Help for Color-slider

Postby ukoenig » Mon Aug 11, 2008 11:20 am

Hello,

if somebody noticed the missing help for the color-sliders.
It is added.

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

Version 8b

Postby ukoenig » Tue Aug 12, 2008 8:50 am

Hello,

there was a missing ) in the source-code-result
The problem is solved.
Copy and past works fine now.

The version-no. changed to 8b

oBar:bClrGrad := { | lInvert | If( ! lInvert, ;
{ { 0.50,65535,32768 },;
{ 0.50,32768,65535 } },;
{ { 0.50,16777215,32768 },;
{ 0.50,32768,16777215 } } ) } <====
oBar:nClrText := 16777215

A new field for the Bar-object is added.
It is possible now, to define oBar, oBar1, obar2 ....
inside the tool.

Download :

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


here is a complete working sample.
It is the basic-structure of the bar-tools.

Image

Code: Select all  Expand view  RUN
#include "FiveWin.ch"
#include "xBrowse.ch"
#include "Slider.ch"

static oWnd

FUNCTION Main()

local oBar, oBtn1

SetBalloon( .T. ) // Balloon shape required for tooltips
oProgFont := TFont():New("Arial", ,-14,.F.,.F. , , , ,.F. )

DEFINE WINDOW oWnd TITLE "Gradient-Selection for" MDI MENU TMenu():New()

DEFINE BUTTONBAR oBar OF oWnd SIZE 80, 80 2007 RIGHT

// Copy and Past from the tools
// --------------------------------------

oBar:bClrGrad :=  { | lInvert | If( ! lInvert, ;
{ { 0.50,8388608,16777215 },;
{ 0.50,16777215,8388608 } },;
{ { 0.50,128,16777215 },;
{ 0.50,16777215,128 } } ) }
oBar:nClrText := 16777215

DEFINE BUTTON oBtn1 OF oBar ACTION ( Tools(oWnd,oBar,oBtn1) )  ;
RESOURCE "magic" PROMPT "Bar-Selection" TOOLTIP "Bar-Select"

SET MESSAGE OF oWnd TO "Testing the ButtonBar 2007 Office look" ;
CENTERED CLOCK KEYBOARD 2007

ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT gradpaint1( hDC, oWnd ) ;
VALID MsgYesNo( "Do you want to end?" )

RETURN NIL

//-----------------  DIALOG ( MDI ) ------------------------------------//

FUNCTION Tools(oWnd,oBar)

LOCAL oDlg, oBar1, oBtn10


DEFINE DIALOG oDlg RESOURCE "Tools" OF oWnd TITLE  "Gradient-Color-Selection" FONT oProgFont

// ----------- Your fields

// You have to call the BUTTONBAR at INIT

REDEFINE BUTTONBMP oBtn10  ID 10 OF oDlg ;
ACTION ( oDlg:End() ) ;
BITMAP "Quit" PROMPT " Exit" TEXTRIGHT
oBtn10:cToolTip =  { "Close" + CRLF + ;
                                "the Dialog","Gradient-Test", 1, CLR_BLACK, 14089979 }

ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
ON PAINT gradpaint2( hDC, oDlg ) ;
ON INIT NEW_DLGBAR(oDlg)

RETURN NIL   

// -----------------------------------------------

static func gradpaint1( hDC, oWnd )

local aGrad := { { 0.50, 8388608, 16054371 } }

GradientFill( hDC,  0, 0, oWnd:nHeight, oWnd:nWidth, aGrad, .F. )

RETURN NIL

// -----------------------------------------------

static func gradpaint2( hDC, oDlg )

local aGrad1 := { { 0.50, 16054371, 8388608 } }

GradientFill( hDC,  0, 0, oDlg:nHeight, oDlg:nWidth, aGrad1, .F. )

RETURN NIL

// ------- TEST - BAR  --------------------------

FUNCTION NEW_DLGBAR(oDlg)
LOCAL oBar1

DEFINE BUTTONBAR oBar1 OF oDlg SIZE 80, 80 2007 RIGHT

// Copy and Past from the tools
// --------------------------------------

oBar1:bClrGrad :=  { | lInvert | If( ! lInvert, ;
{ { 0.50,128,16777215 },;
{ 0.50,16777215,128 } },;
{ { 0.50,128,16777215 },;
{ 0.50,16777215,128 } } ) }
oBar1:nClrText := 16777215

DEFINE BUTTON OF oBar1 ACTION MsgInfo( "Attach" ) ;
RESOURCE "attach" PROMPT "Attach" TOOLTIP "Attach"

DEFINE BUTTON OF oBar1 ACTION MsgInfo( "calendar" ) ;
RESOURCE "calendar" PROMPT "Calendar" TOOLTIP "Calendar"

DEFINE BUTTON OF oBar1 ACTION MsgInfo( "Clients" ) ;
RESOURCE "people" PROMPT "Clients"  TOOLTIP "Clients"

DEFINE BUTTON OF oBar1 ACTION oDlg:End() ;
RESOURCE "quit" PROMPT "Exit"  TOOLTIP "Exit"

RETURN(  NIL )


// ------------- The RC-File ------------

#ifdef __FLAT__
   1 24 "WindowsXP.Manifest"
#endif

#define DIALOG_2   2
#define DIALOG_1   1
attach BITMAP "attach.bmp"
calendar BITMAP "calendar.bmp"
people BITMAP "people.bmp"
print  BITMAP "print.bmp"
magic BITMAP "magic.bmp"
exit  BITMAP "exit.bmp"
floppy  BITMAP "floppy.bmp"
open BITMAP "open.bmp"
quit  BITMAP "quit.bmp"
help  BITMAP "help.bmp"
info BITMAP "info.bmp"
colors BITMAP "colors.bmp"
fonts BITMAP "fonts.bmp"
info1 BITMAP "info1.bmp"

Tools DIALOG 4, 53, 409, 303
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "DBF-Structure"
FONT 10, "MS Sans Serif"
{
DEFPUSHBUTTON "Exit", 10, 282, 271, 68, 27
}



The complete working-directory with EXE-file :

http://www.pflegeplus.com/fw_downloads/TestBar.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: No registered users and 103 guests