Missing ToolBar in Wine

Just starting out? Need help? Post your questions and find answers here.
TassyJim
Enthusiast
Enthusiast
Posts: 191
Joined: Sun Jun 16, 2013 6:27 am
Location: Tasmania (Australia)

Missing ToolBar in Wine

Post by TassyJim »

Hi,
I have a number of users who prefer to use the Windows version of my software under Wine rather than the Linux version.
I have discovered that the ToolBar does not appear in Wine.
I have tried with PB6.21 and PB6.04
I have tried setting the bitmap size using SendMessage_(ToolBarID(0),#TB_SETBITMAPSIZE, 0,24<<16+24) with no success.

I am testing with the examples in the help:

Code: Select all

If OpenWindow(0, 0, 0, 150, 50, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  If CreateToolBar(0, WindowID(0))
      UsePNGImageDecoder()
      Path$ = #PB_Compiler_Home  + "Examples" + #PS$ + "Sources" + #PS$ + "Data" + #PS$ + "ToolBar" + #PS$ + ""
      ToolBarImageButton(0, LoadImage(0, Path$ + "New.png"))
      ToolBarImageButton(1, LoadImage(1, Path$ + "Open.png"))
      ToolBarImageButton(2, LoadImage(2, Path$ + "Save.png"))
      SendMessage_(ToolBarID(0),#TB_SETBITMAPSIZE, 0,24<<16+24)
    EndIf
    Repeat
      Event = WaitWindowEvent()
      If Event = #PB_Event_Menu
        Debug "ToolBar ID: "+Str(EventMenu())
      EndIf
    Until Event = #PB_Event_CloseWindow 
  EndIf
Tried using ico files but no joy.
The toolbar IS there and tooltips appear if you get the mouse "just right" but the buttons are very small and unresponsive.

Any ideas?
I would like to avoid creating my own ToolBar.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 5008
Joined: Sun Apr 12, 2009 6:27 am

Re: Missing ToolBar in Wine

Post by RASHAD »

Hi
Try the next maybe

Code: Select all

UsePNGImageDecoder()

If OpenWindow(0, 0, 0, 150, 150, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered|#PB_Window_SizeGadget)
  If CreateToolBar(0, WindowID(0),#PB_ToolBar_Large )
      Path$ = #PB_Compiler_Home  + "Examples" + #PS$ + "Sources" + #PS$ + "Data" + #PS$ + "ToolBar" + #PS$ + ""
      ToolBarImageButton(0, LoadImage(0, Path$ + "New.png"),#PB_ToolBar_Normal)
      ToolBarImageButton(1, LoadImage(1, Path$ + "Open.png"),#PB_ToolBar_Normal)
      ToolBarImageButton(2, LoadImage(2, Path$ + "Save.png"),#PB_ToolBar_Normal)
    EndIf
    Repeat
      Event = WaitWindowEvent()
      If Event = #PB_Event_Menu
        Debug "ToolBar ID: "+Str(EventMenu())
      EndIf
    Until Event = #PB_Event_CloseWindow 
  EndIf
Egypt my love
TassyJim
Enthusiast
Enthusiast
Posts: 191
Joined: Sun Jun 16, 2013 6:27 am
Location: Tasmania (Australia)

Re: Missing ToolBar in Wine

Post by TassyJim »

Thanks.
#PB_ToolBar_Large was the first thing I tried.
User avatar
deeproot
Enthusiast
Enthusiast
Posts: 286
Joined: Thu Dec 17, 2009 12:00 pm
Location: Llangadog, Wales, UK
Contact:

Re: Missing ToolBar in Wine

Post by deeproot »

@TassyJim Sorry I can't offer any help but just wanted to make a comment. A very long time ago I had exactly the same problem. Everything else worked fine, but no toolbar. Never found a solution using the standard toolbar, but read somewhere it was quite a common issue with Wine and some programs, not just PureBasic-built ones (was a very, very long time ago though!).
Post Reply