Libs : ToolbarPlus
Libs : ToolbarPlus
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
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
Last edited by eddy on Wed Jun 17, 2009 12:51 am, edited 22 times in total.
[ UPDATED ]
new betatest version:
- returnkey event for string gadget
- dropdown arrow
- popup menu
- bug fixed : gadget events
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
- Posts: 39
- Joined: Fri Mar 26, 2004 1:47 pm
- Location: London, UK
- Contact:
well done
Excellent job Eddy - just what I needed.
I had coded some of this functionality using this approach:
But your lib is much handier
Any plans for allowing icons in menuitems?
Thanks,
pantsonhead
I had coded some of this functionality using this approach:
Code: Select all
CreateGadgetList(hndToolBar)
ComboBoxGadget(#gCmbZoom,210,2,50,150,#PB_ComboBox_Editable)
Any plans for allowing icons in menuitems?
Thanks,
pantsonhead
Thx
Menu icons ? perhaps
Me too, I used the same approach in my first version but I had some problems to maintain PB events.pantsonhead wrote:I had coded some of this functionality using this approach:But your lib is much handierCode: Select all
CreateGadgetList(hndToolBar) ComboBoxGadget(#gCmbZoom,210,2,50,150,#PB_ComboBox_Editable)
Any plans for allowing icons in menuitems?
Menu icons ? perhaps
Last edited by eddy on Wed Aug 10, 2005 2:47 am, edited 1 time in total.
-
- User
- Posts: 39
- Joined: Fri Mar 26, 2004 1:47 pm
- Location: London, UK
- Contact:
Menu lib
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?
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
- Posts: 39
- Joined: Fri Mar 26, 2004 1:47 pm
- Location: London, UK
- Contact:
additions to Toolbar lib
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
regards,
pantsonhead
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
regards,
pantsonhead