Libs : ToolbarPlus

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Libs : ToolbarPlus

Post by eddy »

:arrow: new version for PB 4.30 : http://www.purebasic.fr/english/viewtop ... ht=toolbar

Download library (OLD VERSION) : ToolbarPlus.zip ( Extract to your PB folder and restart your PB compiler. )

Its a hack of PB standard toolbar. It's an improved version of my tip : old tip

features:
- toolbar popupmenu
- toolbar arrow
- toolbar space
- toolbar combobox
- toolbar string ( returnkey detection)
- toolbar text
- toolbar button
- toolbar checkbox
- toolbar custom popup proc
- toolbar toggle group
- bug fixed : windowblind ( or skinned ) toolbar --> visual bug
- bug fixed : broken PB event gadget
- bug fixed : if toolbar is in container gadgetlist

Image
Last edited by eddy on Wed Jun 17, 2009 12:51 am, edited 22 times in total.
dige
Addict
Addict
Posts: 1247
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

Yes, works fine here ( winxp, sp2 )
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Yes, works fine here ( winxp, sp2 )
great :)
I need windowblind users too
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

[ UPDATED ]
new betatest version:
- returnkey event for string gadget
- dropdown arrow
- popup menu
- bug fixed : gadget events

Code: Select all

;toolbar popup menu
ToolBarStandardButton(1, #PB_ToolBarIcon_New)
ToolBarToolTip(1,"here : dropdown menu")
SetToolBarArrow(#True)
SetToolBarMenu(1) 

ToolBarStandardButton(2, #PB_ToolBarIcon_New)
ToolBarToolTip(2,"here : dropdown menu (separated arrow)") 
SetToolBarArrow(#False)
SetToolBarMenu(1) 

ToolBarStandardButton(3, #PB_ToolBarIcon_New)
ToolBarToolTip(3,"here : dropdown menu (button)") 
SetToolBarMenu(1) 

;toolbar space
ToolBarSpace(10) 

;toolbar combobox
If ToolbarCombobox(4,0,0,100,100,0)
   AddGadgetItem(4,-1,"combo 1")
   SetGadgetState(4,2)  
EndIf

;toolbar string
ToolbarString(5,0,0,70,21,"blabla",0)
Last edited by eddy on Thu Aug 04, 2005 3:37 pm, edited 1 time in total.
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

[RELEASED]

version 1.0
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Good job Eddy !
pantsonhead
User
User
Posts: 39
Joined: Fri Mar 26, 2004 1:47 pm
Location: London, UK
Contact:

well done

Post by pantsonhead »

Excellent job Eddy - just what I needed.

I had coded some of this functionality using this approach:

Code: Select all

CreateGadgetList(hndToolBar)
ComboBoxGadget(#gCmbZoom,210,2,50,150,#PB_ComboBox_Editable)
But your lib is much handier :)

Any plans for allowing icons in menuitems?

Thanks,
pantsonhead
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

WPW, that is really cool.
Great work eddy :)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Thx :)
pantsonhead wrote:I had coded some of this functionality using this approach:

Code: Select all

CreateGadgetList(hndToolBar)
ComboBoxGadget(#gCmbZoom,210,2,50,150,#PB_ComboBox_Editable)
But your lib is much handier :)
Any plans for allowing icons in menuitems?
Me too, I used the same approach in my first version but I had some problems to maintain PB events.

Menu icons ? perhaps
Last edited by eddy on Wed Aug 10, 2005 2:47 am, edited 1 time in total.
pantsonhead
User
User
Posts: 39
Joined: Fri Mar 26, 2004 1:47 pm
Location: London, UK
Contact:

Menu lib

Post by pantsonhead »

I guess "Menu icons" should really be in a Menu lib

These are the functions I would like to see wrappered in a Menu lib.
Any other suggestions?

Code: Select all

Procedure.b MenuSetCheckImages(hMenu.l, MenuItem.l, img1ID, img2ID)
  result.b=#False
  If IsImage(img1ID) And IsImage(img2ID)
    result= SetMenuItemBitmaps_(hMenu,MenuItem,#MF_BYCOMMAND,UseImage(img1ID),UseImage(img2ID))
  EndIf
  ProcedureReturn result
EndProcedure
     
Procedure.b MenuModifyAsBmp(hMenu.l, item.l, imgID)
  result.b = #False 
  If IsImage(imgID)
    result =  ModifyMenu_(hMenu, item, #MF_BITMAP, item, UseImage(imgID))
  EndIf
  ProcedureReturn result
EndProcedure

Procedure.s GetMenuItemText(menu,item)
  b$=Space(127)
  a=GetMenuString_(menu,item,@b$,127,#MF_BYCOMMAND)
  ProcedureReturn Mid(b$,1,a)
EndProcedure
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

How about a lib with Office XP style menus?
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
pantsonhead
User
User
Posts: 39
Joined: Fri Mar 26, 2004 1:47 pm
Location: London, UK
Contact:

additions to Toolbar lib

Post by pantsonhead »

Hi again Eddy,

Perhaps the radio/toggle toolbar button stuff would be a good addition to your lib.

Example code here:
viewtopic.php?t=10090

Maybe you could put this in version 1.1 :wink:


regards,
pantsonhead
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

W.I.P - version 1.1
- toolbar checkbox
- toolbar custom popup proc
- toolbar toggle group
- bug fixed : if toolbar is in container gadgetlist
- bug fixed : unwanted toolbar events
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

Thanks! great util! :)
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

:)

I updated the app test. (look above)

custom popup example :
Image
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Post Reply