explorerbar Menu popup

explorerbar Menu popup

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6897
Joined: Thu Oct 18, 2012 7:17 pm

Re: explorerbar Menu popup

Postby cnavarro » Thu Mar 01, 2018 12:38 pm

Look

Code: Select all  Expand view


.../...
   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
User avatar
cnavarro
 
Posts: 6522
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: explorerbar Menu popup

Postby cnavarro » Thu Mar 01, 2018 3:41 pm

For next version I added in method lButtondown
Now is more easy

Code: Select all  Expand view

    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
User avatar
cnavarro
 
Posts: 6522
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: explorerbar Menu popup

Postby Silvio.Falconi » Thu Mar 01, 2018 5: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:oPopup: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

Image

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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6897
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests