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

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

Postby Antonio Linares » Tue Jun 24, 2008 7:00 pm

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
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Explorer-Bar Test

Postby ukoenig » Thu Jun 26, 2008 3:49 pm

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby James Bott » Thu Jun 26, 2008 4:59 pm

Uwe,

Code: Select all  Expand view  RUN
oPanel:AddLink( "Ende", { Ende() },"folderimg" )


The second parameter has to be a codeblock not an array.

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

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

Function in Explorer-menue

Postby ukoenig » Thu Jun 26, 2008 5:29 pm

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  Expand view  RUN

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby James Bott » Tue Jul 01, 2008 2:43 am

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

Possible to work with fonts ?

Postby ukoenig » Tue Jul 01, 2008 9:28 am

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Possible to work with fonts ?

Postby andresreyes_mzt » Fri Jul 04, 2008 9:32 pm

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

Changing Fonts

Postby ukoenig » Sat Jul 05, 2008 8:56 am

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby James Bott » Tue Jul 08, 2008 2:42 pm

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

oPanel:Collapse() / oPanel:Expand()

Postby ukoenig » Wed Jul 09, 2008 11:12 am

Hello James,

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

Code: Select all  Expand view  RUN

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby nageswaragunupudi » Wed Jul 09, 2008 12:02 pm

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
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby James Bott » Wed Jul 09, 2008 1:14 pm

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

a flag-status, something like lExpanded or lCollapsed

Postby ukoenig » Wed Jul 09, 2008 2:20 pm

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.
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: Google [Bot] and 68 guests