[TExplorerBar() v1.0] Control Freeware xharbour/fivewin

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

[TExplorerBar() v1.0] Control Freeware xharbour/fivewin

Post by Antonio Linares »

Great freeware control for FiveWin from Andrés Reyes :-)

http://forums.fivetechsoft.com/viewtopic.php?t=11704
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Explorer-Bar Test

Post by ukoenig »

Hello,

I tested the Explorer- Bar.
The sample includes only messages.
As soon i try to include a function, it doesn't work
and i get a error.
The prog.-start jumps straight to the END-function
and shows the YesNo-Message.
When i say NO, i can see the menue.
When i choose END ( 4. Menü ), there is a error.


Image

oPanel := oBar:AddPanel("4. Menü" )
oPanel:AddLink( "Ende", { Ende() },"folderimg" )

// The original function-sample-line from the web-site
// ----------------------------------------------------------
// oPanel:AddLink( "Mi Link", { MiAccion() },"Mi Bitmap" )


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

FUNCTION ENDE()

IF MsgYesNo( "You want to QUIT ?", "ATTENTION" )
QUIT
ENDIF

RETURN( NIL )

Maybe a wrong call of functions ?

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Uwe,

Code: Select all

oPanel:AddLink( "Ende", { Ende() },"folderimg" ) 
The second parameter has to be a codeblock not an array.

oPanel:AddLink( "Ende", { || Ende() }, "folderimg" )

James
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Function in Explorer-menue

Post by ukoenig »

Hello James,

Thank you very much,

I used the sample from the original website.

I tested your solution and it works great now.

I added / changed a few lines on top of the sample
to get a full window :

Code: Select all


aRect3 := GetSysmetrics( 1 ) // Screen-Height
aRect4 := GetSysmetrics( 0 ) // Screen-width

IF MsgYesNo( "Create Explorer-Menue with MDI-Window ?", ;
                     "Your option" )
      DEFINE WINDOW oWnd ;
               FROM 0, 0 TO aRect3, aRect4 PIXEL;
               TITLE "Explorer-Bar with MDI-Window" ;
               MDI
ELSE
      DEFINE WINDOW oWnd ;
               FROM 0, 0 TO aRect3, aRect4 PIXEL;
               TITLE "Explorer-Bar"
ENDIF

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Here are two undocumented methods of the Panel class of TExplorerbar (not to be confused with the Panel class of native FWH).

collapse()
expand()

James
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Possible to work with fonts ?

Post by ukoenig »

Hello James,

do you know, if it is possible to change or work with a defined font ?

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
andresreyes_mzt
Posts: 70
Joined: Fri Jan 11, 2008 6:55 am
Location: Mexico
Contact:

Re: Possible to work with fonts ?

Post by andresreyes_mzt »

ukoenig wrote:Hello James,

do you know, if it is possible to change or work with a defined font ?

Best Regards

Uwe :lol:
I'll be Back,

For change the Font of expando/panel, you need to do

oPanel:SetFont( oFont )


But link it's more dificult

oLink:SetFont( oFont )
oLink:oFontLink:End()
oLink:oFontLink := oFontLink // The font you want to use when the mouse is over

I'm working in a new release and a Documentation of this control,
Sorry,

Regards,

Andres Reyes Hernandez
{{{ ---- xharbour + Borland C --- }}}
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Changing Fonts

Post by ukoenig »

Hello Andres,

I changed the Font.
I the menue-title it is ok
but the 2. part, i don't understand.
I created oFont2 for the link

oBar := TExplorerBar():New()
oPanel := oBar:AddPanel("1. Menü" )

oPanel:lSpecial := .T.

oPanel:SetFont ( oFont1 ) // Title-font size => Arial 20 BOLD
// second menue => Arial 14 BOLD
( the row-height is not adjusted in relation to font-height )

Image

oPanel:AddLink("1. Auswahl", bClick,"presentation")
oPanel:AddLink("2. Auswahl", bClick,"welt")
oPanel:AddLink("3. Auswahl", bClick,"drucker")
oPanel:AddLink("4. Auswahl", bClick,"copycd")

?????????????
//------------- your sample for the links ---

// oLink:SetFont( oFont )
// oLink:oFontLink:End()
// oLink:oFontLink := oFontLink // The font you want to use when the mouse is over


Just the adjustment of the row-height in relation to the font-size
and i think it is perfect.

There was still a question from a customer of mine,
if it is possible, to save the status ( hide / enable )
of the link-menues ( the button for hide / enable ).
I think, there is a logical var for this.


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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Andres,

May I also suggest adding oFont to the parameters for the New() methods for all the classes. This way we can also use xBase syntax "FONT oFont" with the use of the include file.

James
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

oPanel:Collapse() / oPanel:Expand()

Post by ukoenig »

Hello James,

One problem is solved :
how to use < Collapse() and Expand() > from your toppic
----------------------------------------------------------------------

Code: Select all


oBar := TExplorerBar():New() 
oPanel := oBar:AddPanel("1. Menü" )
oPanel:lSpecial := .T.  // aktive Kopfleiste
oPanel:SetFont ( oFont1 )

oPanel:AddLink("1. Auswahl", bClick,"presentation")
oPanel:AddLink("2. Auswahl", bClick,"welt") 
oPanel:AddLink("3. Auswahl", bClick,"drucker")
oPanel:AddLink("4. Auswahl", bClick,"copycd")
  
oPanel := oBar:AddPanel("2. Menü" )
oPanel:lSpecial := .T.
oPanel:SetFont ( oFont2 )

oPanel:AddLink("1. Auswahl", bClick,"eingfolder")
oPanel:AddLink("2. Auswahl", bClick,"Bildschirm")
oPanel:AddLink("3. Auswahl", bClick,"Service")

// I want to hide the contents of < 2. Menü >
// on a special workstation on start
// it could be a result of the user-loggin

IF user = .........
      oPanel:Collapse()
ENDIF

2. menü is disabled
You can activate again with the menue-button
----------------------------------------------------
Image

If there would be a return .T. or .F.,
of the status Collapse() / Expand(),
it would be possible, to save the settings at prog-end
and do a prog-start with the saved settings.

Best regards

Uwe :lol:
Last edited by ukoenig on Wed Jul 09, 2008 12:03 pm, 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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

I would like to say only this much, that this is best control we got for FW in the recent past. Lots of thanks to Mr. Andrés Reyes.

I hope Mr. Andrés Reyes will continue this help with updates and upgrades compatible with future versions of (x)Harbour and FWH.

Thanks again to Mr. Andrés Reyes
Regards

G. N. Rao.
Hyderabad, India
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Uwe,
If there would be a return .T. or .F., of the status Collapse() / Expand(), it would be possible, to save the settings at prog-end and do a prog-start with the saved settings.
Unfortunately, this would mean you would have to call the method to find the status, and calling the method would change the status.

Better would be a method of the TExploerbar class that would return an array containing the status of each Expando (panel). Of course, each Expando would have to have a flag showing its status, something like lExpanded or lCollapsed. This flag should be READONLY.

Regards,
James
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

a flag-status, something like lExpanded or lCollapsed

Post by ukoenig »

Hello James,

yes, that is much better.

Because i couldn't change the hight of a menue-row with a font,
i changed the BMP-size, hoping, the row would adjust to the BMP.
The BMP was re-adjusted to the row-hight.
It seems, it doesn't matter what BMP-size you use.

oPanel:Hide() // Hide 2. menue works as well !!!
// -------------

Image


I agree with nageswaragunupudi,
Andrés did a really great job.


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.
Post Reply