It is currently Mon Sep 23, 2019 4:48 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Sun Aug 14, 2005 8:26 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
[ RELEASED ]

version 1.1

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Sep 04, 2005 11:06 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
[ RELEASED ]

- flag parameter are now optional for toolbar gadgets (combo, checkbox, string, text, button)
- bug fixed : flags not used

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Sep 06, 2005 6:08 am 
Offline
User
User

Joined: Sun Aug 03, 2003 12:05 am
Posts: 39
Location: Australia
:D
Thank you.
This is a great addon to pb.

_________________
Ziltch - http://www.youtube.com/user/OZiltch


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Sep 07, 2005 9:31 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 06, 2003 2:49 pm
Posts: 362
Location: Venice - Italy, Japan when possible.
eddy wrote:
:)

I updated the app test. (look above)

custom popup example :


Hi, the app test is missing...

_________________
Universal Videogame List


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 08, 2005 5:26 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
True, I removed it.
The lib is stable now

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Oct 23, 2005 7:32 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 30, 2003 11:19 pm
Posts: 1808
Location: Emerald Cove, Unformed
This looks really sweet, I stumbled across this since the PBOSL version doesnt have combo boxes . actually, these are probably two different products? Anyways, cheers!


On a side note, the Menu Arrow function totally disables the button when set to True, if going by the examples in the help (chm) file. Is there any way this can be fixes so we can use the Arrow function and the popup menu?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 25, 2005 12:14 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
Shannara wrote:
On a side note, the Menu Arrow function totally disables the button when set to True, if going by the examples in the help (chm) file.

I don't understand your problem. Could you post an example ?

Quote:
Is there any way this can be fixes so we can use the Arrow function and the popup menu?

No

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 25, 2005 2:14 am 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 30, 2003 11:19 pm
Posts: 1808
Location: Emerald Cove, Unformed
Hmm, stupid me for not mentioning it in my last post. Sorry about that! I thought I mentioned the example that came with the helpfile.. Here' I'll post it here ..

Code:
Enumeration
   #TB_1
   #TB_2
   #TB_BUTTON
   #TB_STRING
   #TB_COMBO
   #TB_CHECK
   #POPUP   
EndEnumeration   

OpenWindow(#PB_Any,100,100,360,240,#PB_Window_SystemMenu,"Test")
CreateGadgetList(WindowID())

;menu
CreateMenu(#PB_Any,WindowID())
MenuTitle("File")
menuH=GetSystemMetrics_(#SM_CYMENU)   

;popupmenu for toolbar
CreatePopupMenu(#POPUP)
MenuItem(10,"MenuID 10")
MenuItem(20,"MenuID 20")
MenuItem(30,"MenuID 30")

;statusbar
hStatus=CreateStatusBar(0,WindowID())
GetClientRect_(hStatus,rc.RECT):statusH=rc\bottom-rc\top

; =================
; TOOLBAR TOP
; =================

;toolbar
hToolbar=CreateToolBar(#TB_1, WindowID())
GetClientRect_(hToolbar,rc.RECT):toolbarH=rc\bottom-rc\top
If hToolbar
   ;toolbar combobox
   If ToolbarCombobox(#TB_COMBO,5,0,100,100)
      AddGadgetItem(#TB_COMBO,-1,"combo 1")
      AddGadgetItem(#TB_COMBO,-1,"combo 2")
      AddGadgetItem(#TB_COMBO,-1,"combo 3")
      SetGadgetState(#TB_COMBO,2) 
   EndIf
   ToolBarSpace(5)
   
   ;toolbar button
   ToolbarButton(#TB_BUTTON,0,0,40,21,"OK")
   ToolBarSpace(10)
   
   ;toolbar arrow & menu
   ToolBarStandardButton(40, #PB_ToolBarIcon_New):ToolBarToolTip(40,"...")
   SetToolBarArrow(#True)
   SetToolBarMenu(#POPUP)
   ToolBarSeparator() 
   
   ToolBarStandardButton(50, #PB_ToolBarIcon_New):ToolBarToolTip(50,"MenuID 50")
   SetToolBarArrow(#False)
   SetToolBarMenu(#POPUP)
   ToolBarSeparator() 
   
   ToolBarStandardButton(60, #PB_ToolBarIcon_New):ToolBarToolTip(60,"...")
   SetToolBarMenu(#POPUP)
   ToolBarSpace(10)
EndIf


; =================
; TOOLBAR BOTTOM
; =================

hContainer=GadgetID(ContainerGadget(#PB_Any,0,WindowHeight()-menuH-statusH-toolbarH,WindowWidth(),toolbarH))
If hContainer
   ;toolbar
   hToolbar=CreateToolBar(#TB_2,hContainer)
   
   ;toolbar string
   ToolbarString(#TB_STRING,5,0,100,21,"blabla")
   ToolBarSpace(5)
   ToolBarStandardButton(70, #PB_ToolBarIcon_Properties):ToolBarToolTip(70,"MenuID 70")
   ToolBarSeparator()
   
   ;toolbar checkbox
   ToolbarCheckBox(#TB_CHECK,0,0,80,21,"check me")
   ToolBarSpace(10)
   ToolBarSeparator()
   
   ;toolbar text
   TextID=ToolbarText(#PB_Any,0,0,90,21," text...",#PB_Text_Border)   
   CloseGadgetList()
EndIf

; =================
; CLIENT AREA
; =================

ContainerGadget(#PB_Any,0,toolbarH,WindowWidth(),WindowHeight()-menuH-statusH-toolbarH*2,#PB_Container_Double)
CloseGadgetList()


Repeat
   e=WaitWindowEvent()
   If e=#PB_Event_Gadget
      et.s=Str(EventType())
      gs.s=Str(GetGadgetState(EventGadgetID()))
      Select EventGadgetID()
         Case #TB_COMBO
            StatusBarText(0,0," COMBOBOX >> GadgetState = "+gs+" >> EventType = "+et)
         Case #TB_BUTTON 
            StatusBarText(0,0," BUTTON >> GadgetState = "+gs)
         Case #TB_CHECK
            StatusBarText(0,0," CHECK >> GadgetState = "+gs)
         Case #TB_STRING
            If EventType()=#PB_EventType_ReturnKey : et = "PB_EventType_ReturnKey" : EndIf       
            StatusBarText(0,0," STRING >> EventType = "+et)
         Default
            Debug EventGadgetID()
      EndSelect
   EndIf
   If e=#PB_Event_Menu
      StatusBarText(0,0," TOOLBAR >> MenuID = "+Str(EventMenuID()))
   EndIf
   
Until e = #PB_Event_CloseWindow


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 25, 2005 2:23 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
This example works perfectly for me.
Which part should I check ?

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 25, 2005 2:50 am 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 30, 2003 11:19 pm
Posts: 1808
Location: Emerald Cove, Unformed
I dont know really, I simply copied that example (From your help file) to japbe and ran it. When I clicked on the down arrow, it does nothing, not even show the click image, and no menu pops up .. I'll debug through it again, but it doesnt popup an error or anything. Hrm.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 25, 2005 11:46 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10524
Location: Beyond the pale...
This is a bum spankingly brilliant library. Well done.

Eddy, is this library compatible with Danilo's Professional Toolbar lib?

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 26, 2005 4:53 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
srod wrote:
Eddy, is this library compatible with Danilo's Professional Toolbar lib?

err i think it isn't

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 26, 2005 4:57 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
Shannara wrote:
I dont know really, I simply copied that example (From your help file) to japbe and ran it. When I clicked on the down arrow, it does nothing, not even show the click image, and no menu pops up .. I'll debug through it again, but it doesnt popup an error or anything. Hrm.


I searched but I didn't found the problem.
Did you use PB 3.94 ?
Did you download the last version of my lib ?

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 08, 2006 1:05 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1534
Location: In a long distant galaxy
hello,

is this lib PB4 ready ?

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 08, 2006 1:07 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1534
Location: In a long distant galaxy
at the moment i use your old code that i modified a little to work as i need it.

Code:
; /////////////////////////////

ProcedureDLL.l ToolBarGadgetOpen(toolbar, offsetX, w)
  Protected t.TBBUTTON, r.RECT, pos.l, ret.l
  pos = SendMessage_(ToolBarID(toolbar), #TB_BUTTONCOUNT,  0, 0)    : ToolBarSeparator()
  ret = SendMessage_(ToolBarID(toolbar), #TB_GETBUTTON,    pos, @t) : t\iBitmap = offsetX + w
  ret = SendMessage_(ToolBarID(toolbar), #TB_DELETEBUTTON, pos, 0)
  ret = SendMessage_(ToolBarID(toolbar), #TB_INSERTBUTTON, pos, t)
  ret = SendMessage_(ToolBarID(toolbar), #TB_GETITEMRECT,  pos, @r)
  UseGadgetList(ToolBarID(toolbar))
  ProcedureReturn r\left
EndProcedure

ProcedureDLL.l ToolBarGadgetClose(toolbar)
  UseGadgetList(GetParent_(ToolBarID(toolbar)))
EndProcedure

ProcedureDLL.l ToolBarButton(toolbar, gadget, offsetX, offsetY, w, h, text.s)
  Protected x.l = ToolBarGadgetOpen(toolbar, offsetX, w)
  ButtonGadget(gadget, x + offsetX, offsetY, w, h, text)
  ToolBarGadgetClose(toolbar)
EndProcedure

ProcedureDLL.l ToolBarDate(toolbar, gadget, offsetX, offsetY, w, h, mask.s)
  Protected x.l = ToolBarGadgetOpen(toolbar, offsetX, w)
  DateGadget(gadget, x + offsetX, offsetY, w, h, mask)
  ToolBarGadgetClose(toolbar)
EndProcedure

; /////////////////////////////

#WINDOW  = 7
#TOOLBAR = 10
#GADGET1 = 1
#GADGET2 = 2

If OpenWindow(#WINDOW, 200, 100, 400, 240, "Test", #PB_Window_SystemMenu)
 
  If CreateToolBar(#TOOLBAR, WindowID(#WINDOW))
    ToolBarStandardButton(1, #PB_ToolBarIcon_New)
    ToolBarStandardButton(2, #PB_ToolBarIcon_New)
    ToolBarStandardButton(3, #PB_ToolBarIcon_New)
    ToolBarSeparator()
    ToolBarDate  (#TOOLBAR, #GADGET1, 1, 1, 120, 21, "%dd / %mm / %yyyy")
    ToolBarSeparator()
    ToolBarButton(#TOOLBAR, #GADGET2, 1, 1, 50, 21, "Exit")
    ToolBarSeparator()
    ToolBarStandardButton(4, #PB_ToolBarIcon_New)
    ToolBarStandardButton(5, #PB_ToolBarIcon_New)
    ToolBarStandardButton(6, #PB_ToolBarIcon_New)
  EndIf
 
  GadgetToolTip(#GADGET1, "DateGadget in toolbar")
  GadgetToolTip(#GADGET2, "Exit")
 
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_Menu
        If EventMenu() = 1
          Break
        EndIf
      Case #PB_Event_Gadget
        If EventGadget() = #GADGET2
          Break
        EndIf
      Case #PB_Event_CloseWindow
        Break
    EndSelect
  ForEver
 
EndIf

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye