FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveLinux / FiveDroid (Android) FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posts: 31
Joined: Wed Mar 19, 2008 08:52 AM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Wed Mar 19, 2008 09:40 AM
Hello!

I think this FiveLinux has a Button Bar Error(???)

My OS : Ubuntu Linux 7.10

Please Help me!!!

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Fri Mar 21, 2008 12:36 AM
Please build samples\tutor04.prg. See how it looks:
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Fri Mar 21, 2008 12:50 AM
Ok, we found whats going on. You need to create a main pulldown menu in order to get properly placed the buttonbar:
#include "FiveLinux.ch"

static oWnd

function Main()

   local oBar
   
   DEFINE WINDOW oWnd TITLE "Test" MENU BuildMenu()
   
   DEFINE BUTTONBAR oBar OF oWnd
   
   DEFINE BUTTON OF oBar ACTION MsgInfo( 1 )
   
   DEFINE BUTTON OF oBar ACTION MsgInfo( 2 )

   DEFINE BUTTON OF oBar ACTION MsgInfo( 3 )

   ACTIVATE WINDOW oWnd
   
return nil       

function BuildMenu()

   local oMenu
   
   MENU oMenu
      MENUITEM "One"   ACTION MsgInfo( 1 )
      MENUITEM "Two"   ACTION MsgInfo( 2 )
      MENUITEM "Three" ACTION MsgInfo( 3 )
   ENDMENU
   
return oMenu

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Fri Mar 21, 2008 05:39 AM

Hi Antonio

The RESOURCE clause of the DEFINE BUTTON OF BUTTONBAR command is ? the name of a png file or svg file? Where does the sytem look? Ehat is the best way to create your own ones?

Regards

Doug
(xProgrammer)

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Fri Mar 21, 2008 09:28 AM

Doug,

They are gnome predefined PNGs files located at:

/usr/share/icons/gnome/...x.../actions
/usr/share/icons/Human/...x.../actions

I guess you can add yours there too

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 31
Joined: Wed Mar 19, 2008 08:52 AM
FiveLinux Button Bar
Posted: Sat Mar 22, 2008 09:20 AM
Thank you for your answer Antonio.

but there are still some errors.




tutor04.prg Compile or link error

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Sat Mar 22, 2008 10:32 AM

> tutor04.prg Compile or link error

What errors do you get ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Sat Mar 22, 2008 09:13 PM

Oknbs, may I ask what kind of editor you use?
Thanks in advance
Otto

Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Editor
Posted: Sat Mar 22, 2008 10:47 PM

Hi Otto

It looks like the KDE editor called KATE. I dont think it is
cross platform though.

Cheers

Colin

Posts: 464
Joined: Tue May 16, 2006 07:47 AM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Sun Mar 23, 2008 04:18 AM
Kate is a pretty nice text editor and comes with xHarbour language highlighting. Its KDE based so only available for Linux. By saving sessions you can effectively have it set up on a project basis. It tracks and shows levels of IF - ELSE - ENDIF, FUNCTION - RETURN etc but the language file needs some tweaking for FiveLinux as it sees

oDlg:End()


as an END which throws this functionality out.

Regards
Doug
(xProgrammer)
Posts: 31
Joined: Wed Mar 19, 2008 08:52 AM
FiveLinux DEFINE Button
Posted: Mon Mar 24, 2008 08:12 AM

Hi Antonio.

"RESOURCE" of the DEFINE BUTTON in a FiveLinux.ch File of downloded FTDN March 2008 FiveLinux is not defined, and TButton Class too.

< FiveLinux.ch >

xcommand DEFINE BUTTON [<oBtn>] ;

        [ OF &lt;oBar&gt; ] ;
        [ &lt;label: LABEL, PROMPT&gt; &lt;cText&gt; ] ;
        [ &lt;img: IMAGE&gt; &lt;cImgName&gt; ] ;
        [ ACTION &lt;uAction&gt; ] ;
        [ &lt;group: GROUP&gt; ] ;
        =&gt; ;
        [ &lt;oBtn&gt; := ] TButton():NewBar( [&lt;oBar&gt;], &lt;cText&gt;,;
        &lt;cImgName&gt;, [ \{|o|&lt;uAction&gt;\} ], &lt;.group.&gt; )

< tutor04.prg sample >
DEFINE BUTTON OF oBar RESOURCE "gtk-new" ACTION MsgInfo( "New" )

DEFINE BUTTON OF oBar RESOURCE "gtk-open" ACTION MsgInfo( "Open" )

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Mon Mar 24, 2008 08:27 AM
Please modify this line in the command:

[ <img: IMAGE, RESOURCE> <cImgName> ] ;
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 31
Joined: Wed Mar 19, 2008 08:52 AM
FiveLinux Button Bar
Posted: Mon Mar 24, 2008 10:36 AM
Thank you for your answer Antonio.

Modify tutor04.prg ..... error

Posts: 464
Joined: Tue May 16, 2006 07:47 AM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Mon Mar 24, 2008 08:14 PM

I tried to build tutor04 and got the same error.

For the record I made the change to FiveLinux.ch referred to above which fixed 3 of the 5 compile errors but @ <row>, <col> BUTTON .... also needs to be fixed. To get around it I just changed RESOURCE in the .prg file to IMAGE.

I haven't been using COMBOBOXes in my code nor BUTTONs with IMAGEs/RESOURCEs but I thought I had successfully built tutor04 sometime in the past (but not on current machine so can't state that categorically).

Regards
Doug
(xProgrammer)

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FiveLinux Button Bar ( My OS : Ubuntu 7.10 )
Posted: Mon Mar 24, 2008 10:52 PM

Doug, Oknbs,

Please use this library instead of the one that you are linking:

http://rapidshare.com/files/102094690/libfivec.zip.html

regards, saludos

Antonio Linares
www.fivetechsoft.com