Page 1 of 1

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

Posted: Tue Jun 24, 2008 7:00 pm
by Antonio Linares
Great freeware control for FiveWin from Andrés Reyes :-)

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

Explorer-Bar Test

Posted: Thu Jun 26, 2008 3:49 pm
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:

Posted: Thu Jun 26, 2008 4:59 pm
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

Function in Explorer-menue

Posted: Thu Jun 26, 2008 5:29 pm
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:

Posted: Tue Jul 01, 2008 2:43 am
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

Possible to work with fonts ?

Posted: Tue Jul 01, 2008 9:28 am
by ukoenig
Hello James,

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

Best Regards

Uwe :lol:

Re: Possible to work with fonts ?

Posted: Fri Jul 04, 2008 9:32 pm
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

Changing Fonts

Posted: Sat Jul 05, 2008 8:56 am
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:

Posted: Tue Jul 08, 2008 2:42 pm
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

oPanel:Collapse() / oPanel:Expand()

Posted: Wed Jul 09, 2008 11:12 am
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:

Posted: Wed Jul 09, 2008 12:02 pm
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

Posted: Wed Jul 09, 2008 1:14 pm
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

a flag-status, something like lExpanded or lCollapsed

Posted: Wed Jul 09, 2008 2:20 pm
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: