How can I make this ?

How can I make this ?

Postby Marco Turco » Wed Aug 12, 2009 9:10 am

Hi,
is there a FWH build-in class to make this ? See
Image
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: How can I make this ?

Postby James Bott » Wed Aug 12, 2009 8:09 pm

Marco,

No, but you could use the new Ribbonbar to do something similar.

An Explorer bar would also work. There was a third-party one, but I think it is dead. It would be nice if Antonio would put it on his To-Do list.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: How can I make this ?

Postby ukoenig » Thu Aug 13, 2009 4:31 pm

James,

I finished testing Ribbonbar-Values.
I think, using a Ribbonbar is not the Solution, because You will always have Tabs on Top of the Bar.
In case, Marco wants to change to different Menues ( Levels ), it will work.
I tested with just one Group, but the Result looks different to Marco's Screenshot.
I don't know for the Moment, if it is possible to hide the Tabs and work with just one Group.
Using Vtitle with included Buttons, could be a Solution.

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: How can I make this ?

Postby Marco Turco » Thu Aug 13, 2009 6:18 pm

Hi,
the better solution I have found is using rbbuttons.
Image

However I have the followin problem:
I need to change the windows color background at runtime and the buttons always keep the previous windows color,
do you know if is there a way to update the correct background for the button ?

This is a self contained code that show the problem. PRessing the button the windows background change but the button background remains white.


Code: Select all  Expand view
#include "fivewin.ch"
#include "ribbon.ch"

Function main()

    local oWnd
    local oBtn1


    DEFINE WINDOW oWnd TITLE "TTitle Class Test"

   @ 20, 10 RBBTN oBtn1 OF oWnd BITMAP "24exit.bmp";
              SIZE 100, 25   PROMPT "Test " TRANSPARENT MOSTLEFT;
              ACTION ChangeWndColor(oWnd)

    activate window oWnd maximized


return nil

Function ChangeWndColor(oWnd)
    oWnd:Setcolor(nil, nrgb(199,213,239))
    oWnd:Refresh()
    return




Any ideas ?
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: How can I make this ?

Postby Daniel Garcia-Gil » Thu Aug 13, 2009 6:40 pm

Hello Marco

try with this code
Code: Select all  Expand view

#include "fivewin.ch"
#include "ribbon.ch"

Function main()

    local oWnd
    local oBtn1


    DEFINE WINDOW oWnd TITLE "TTitle Class Test"

   @ 20, 10 RBBTN oBtn1 OF oWnd BITMAP "24exit.bmp";
              SIZE 100, 25   PROMPT "Test " TRANSPARENT MOSTLEFT;
              ACTION ( ChangeWndColor(oWnd), ChangeBTNColor( oWnd ) )

    activate window oWnd maximized


return nil

Function ChangeWndColor(oWnd)
    oWnd:Setcolor(nil, nrgb(199,213,239))
    oWnd:Refresh()
return

Function ChangeBTNColor( oWnd )
local n, oBtn

    if ! Empty( oWnd:aControls )
      for n = 1 to Len( oWnd:aControls )
         if oWnd:aControls[ n ]:Classname == "TRBTN"
            oBtn = oWnd:aControls[ n ]
            DeleteObject( oBtn:hBack )
            oBtn:hBack := CreateSolidBrush( nrgb(199,213,239) )
            oBtn:ReleaseDC()
         endif
      next
    endif      
         
return nil
 
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: How can I make this ?

Postby ukoenig » Fri Aug 14, 2009 9:08 am

Marco,

You can create Your own Buttonbar and display inside any Control on any Place You like.

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: How can I make this ?

Postby Marco Turco » Fri Aug 14, 2009 9:11 am

It runs fine.

Thank you.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: How can I make this ?

Postby Marco Turco » Fri Aug 14, 2009 9:13 am

You are right but with your solution - as I know - I can't display the support image and the text. Isn't it ?

ukoenig wrote:Marco,

You can create Your own Buttonbar and display inside any Control on any Place You like.

Image

Best Regards
Uwe :lol:
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests