toolbar button tooltip

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

Hi Fred,
I mentioned this as you released 2.7 version:
The only thing you forgot is to make tooltips available for ToolbarGadgets.
(GadgetToolTip is not working with ToolbarButtons on my system...)
If somebody codes a application with 'normal' buttons and a toolbar, he has no tooltips for ToolbarButtons.

BTW: Don't want to push you Fred, but it would be nice to have (some day...) all gadgets available that the coder can put in a toolbar; Buttons with image & text (big & small) and all the other stuff.
Hope you didn't forget it did you?



Have a nice day...
Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

PB needs a completely new toolbar
with much more features.
I think i´ll begin it after my current
Library, but as Fred said: thats not so easy...
(i collected some infos about it)

cya,
...Danilo


(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

The stuff I miss about the current ToolBar lib:

- Rebar (movable) toolbar like in IE
- CheckButton (On/Off) like in Word
- optionnal text
- buttons with popup-menu
- Tooltips :)

Some work here..

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

Well I have some code that I started some times ago it's not finished yet but it displays a toolbar with Win32 API...

Code: Select all

 
; try to create a API ToolBar
; dosn't work properly yet! 
; Franco :{

Procedure CreateAPIToolBar(hWnd)
 ; InitCommonControls_() <- works so far also without this init... is this OK?
  hWndTB=CreateWindowEx_(0,"ToolbarWindow32","", #WS_CHILD|#WS_BORDER|#TBSTYLE_TOOLTIPS,0, 0, 0, 0,hWnd,2000,0,#NULL)

  ToolBarButton1.TBBUTTON
;  ToolBarButton1.TBBUTTON\iBitmap   = #IDI_APPLICATION                       ; Index of bitmap not used yet
;  ToolBarButton1.TBBUTTON\idCommand =                                        ; Msg sent by button not used yet

;  ToolBarButton1.TBBUTTON\fsState   = #TBSTATE_CHECKED                       ; State bit
;  ToolBarButton1.TBBUTTON\fsState   = #TBSTATE_PRESSED                       ; State bit
  ToolBarButton1.TBBUTTON\fsState   = #TBSTATE_ENABLED                       ; State bit
;  ToolBarButton1.TBBUTTON\fsState   = #TBSTATE_HIDDEN                        ; State bit
;  ToolBarButton1.TBBUTTON\fsState   = #TBSTATE_INDETERMINATE                 ; State bit
;  ToolBarButton1.TBBUTTON\fsState   = #TBSTATE_WRAP                          ; State bit

;  ToolBarButton1.TBBUTTON\fsStyle   = #TBSTYLE_TOOLTIPS                      ; Style bit
;  ToolBarButton1.TBBUTTON\fsStyle   = #TBSTYLE_CHECK                         ; Style bit
  ToolBarButton1.TBBUTTON\fsStyle   = #TBSTYLE_BUTTON                        ; Style bit

;  ToolBarButton1.TBBUTTON\dwdata    =                                        ; not used yet
  String = SendMessage_(hWndTB,#TB_ADDSTRING,0, "Open")                      ; String To put on Button
  ToolBarButton1.TBBUTTON\iString   = String

  ToolBarButton2.TBBUTTON
  ToolBarButton2.TBBUTTON\fsState   = #TBSTATE_ENABLED                       ; State bit
  ToolBarButton2.TBBUTTON\fsStyle   = #TBSTYLE_BUTTON                        ; Style bit
 
  SendMessage_(hWndTB, #TB_BUTTONSTRUCTSIZE,SizeOf(TBBUTTON), 0)
  SendMessage_(hWndTB,#TB_ADDBUTTONS,1,ToolBarButton1)
  SendMessage_(hWndTB,#TB_ADDBUTTONS,1,ToolBarButton2)
  ShowWindow_(hWndTB,#SW_SHOW)
EndProcedure

hWnd=OpenWindow(0, 200, 200, 320,240, #PB_Window_SystemMenu ,"Test Window")

CreateAPIToolBar(hWnd)

Repeat
  EventID.l = WaitWindowEvent()
Until EventID = #PB_EventCloseWindow
End
...I told you this is ugly code and not finished yet,
but maybe somebody has time to play with... (I don't)



Have a nice day...
Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Heya Fred !!

I´m writing a REBAR-Library (Coolbar) atm !! :wink:

Thats why i asked the questions about
the MENU and Toolbar yesterday.
I still dont know how to add a PB-Menu
to the Coolbar.
I can only add a Toolbar (with help
of another window).

I´ll send you a PREVIEW-Version by mail,
so you can see how it looks (earlier beta).

Dont you use MSDN ??
Its all in the Microsoft Manuals on
the MSDN CDs (cheap @ ebay.com/.de).

Flat and Transparency Toolbars with
all that stuff like InternetExplorer
is the next thing i want.
Shouldnt be a big problem to make
a better Toolbar with nice buttons
(and add the Toolbar to a Coolbar),
but Tooltips for all the supported
Buttons are not easy to add.

The Toolbar sends a message to the main-
window, if it needs a Tooltip.
So the app gets the message and sends
the tooltip text back to the toolbar.

The big thing why i want a new toolbar
is that images can be *any* size, so you
can make a menu like in WinZip with a Toolbar.

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.

Hi Danilo,

please continue your great work in Library development. Your Coolbar-Lib listens very nice! :)

*wait4it* :)


Mike

Tranquilizer/ Secretly!
Registred PureBasic User
Post Reply