FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour explorerbar Menu popup
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
explorerbar Menu popup
Posted: Thu Mar 01, 2018 11:52 AM

is it possible insert a popup menu on one Item of Menu exploerbar ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: explorerbar Menu popup
Posted: Thu Mar 01, 2018 12:38 PM
Look

Code (fw): Select all Collapse
.../...
   local bClick1 := { | o | MnuButton( , , , o ) }
.../...

      :AddLink( "Explorer", bClick1, "C:\Fwh\Bitmaps\16date.bmp", , CLR_BROWN, , )
.../...


Function MnuButton( nR, nC, nF, oParent )

   local oMenu
   local aCoors
   DEFAULT nR   := oParent:nBottom
   DEFAULT nC   := oParent:nRight
   aCoors       := ScreenToClient( oParent:hWnd, { nR, nC } )
   MENU oMenu POPUP FONT oFont 2015 ;
      COLORMENU CLR_WHITE, CLR_BROWN

.../...

   ENDMENU
   ACTIVATE MENU oMenu AT aCoors[ 1 ] + oParent:nHeight, oParent:nRight OF oParent
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: explorerbar Menu popup
Posted: Thu Mar 01, 2018 03:41 PM
For next version I added in method lButtondown
Now is more easy

Code (fw): Select all Collapse
    Eval( ::bAction, Self, nRow, nCol, nFlags )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: explorerbar Menu popup
Posted: Thu Mar 01, 2018 05:03 PM
must be a data type " oPopup" on CLASS TTaskPanel my advise

and insert here

METHOD AddLink( cPrompt, bAction, cBitmap, oFnt, nClrT, nClrP, nClrO , oPopup,lpopup )

wheh the lpopup is true it must drwar an arrow at left

if ::oPopup != nil
->>>>>>>>>>>>>>draw arrow
endif

then on texplorerbar class when there is oUrlLink:bAction = bAction

if oItem:oPopup != nil

oItem:Activate( x , y,oExp, .f. )


the problem My advice is on Urlink class because My advice you must before modify the Urlink class and insert the possibility to insert a popup menu and the you can insert the popup on texplorerbar

it not easy
this because Texplorerbar is made with foots....

if the author inserted the items in the same way as the menu and did not use the Urlnk class we could now have the popup menu directly. And then the menu options can not have special effects like the colors of win10 or office2007 but only an underlined word. this I could understand for an initial state just to try but in the long run nothing has changed for which remained the urllnk even if I had long ago the lib of that author where the menu options were different

and I made it allready



remember when I need an arrow with turlink ? then I cannot insert it on urlink
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion