Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

[MBS] Canvas in NSToobarMBS (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] User Resizable View
Next thread: [MBS] MBS functions, encodings, and Japanese OS


Re: [MBS] PortAudio bug?   -   Garth Hjelte
  [MBS] Canvas in NSToobarMBS   -   William Koperwhats
   Re: [MBS] Canvas in NSToobarMBS   -   William Koperwhats
   Re: [MBS] Canvas in NSToobarMBS   -   Christian Schmitz

[MBS] Canvas in NSToobarMBS
Date: 03.04.13 17:47 (Wed, 3 Apr 2013 09:47:00 -0700)
From: William Koperwhats
I had asked earlier about placing other objects in the toolbar and following Christian's advice on using the NSToolbarMBS class was able to get things working (at least in Cocoa). The immediate need is to place a canvas (containing a few other controls) in the toolbar, similar to how iTunes displays playback information.

For the most part this works (see: http://www.miloslick.com/mallincam/MallinCam_Control_2.0_preview.png), but one problem that I've come across is that if the canvas contains a bevel button, it is unable to respond to mouse clicks. Other types controls (an embedded canvas for example) don't have this problem and I was wondering if there is a workaround?

Also, has anyone done this in Windows?

Cheers.

-bill k

FYI:

I'm using the following to get the canvas into the toolbar (based loosely on the "Toolbar add Textfield" example):

'Properties of winMain:
InformationView As NSViewMBS
cvsInformation As Canvas

Private Sub UpdateToolbar()
Dim tbar As NSToolbarMBS
Dim item as NSToolbarItemMBS
Dim items() As NSToolbarItemMBS

tbar = winMain.NSToolbarMBS
items = tbar.Items

InformationView = New NSViewMBS(cvsInformation.Handle)

For Each item In items
If item.Label = "Information Panel" Then
item.View = InformationView
item.MaxSize = NSMakeSizeMBS(cvsInformation.Width, cvsInformation.Height)
item.MinSize = NSMakeSizeMBS(cvsInformation.Width, cvsInformation.Height)
'item.Label = ""
End If
Next item

End Sub

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Canvas in NSToobarMBS
Date: 03.04.13 20:00 (Wed, 3 Apr 2013 12:00:41 -0700)
From: William Koperwhats
Thanks Christian, the NSViewMBS works just fine (see the screenshot), but the issue is that the bevel button won't accept mouse clicks. I can put a canvas in it's place and duplicate the functionality, but the BB looks better. In the end this needs to be cross-platform which will add to the complexity.

-bill k

On Apr 3, 2013, at 11:43 AM, Christian Schmitz <<email address removed>> wrote:

>
> Am 03.04.2013 um 18:47 schrieb William Koperwhats <<email address removed>>:
>
>> The immediate need is to place a canvas (containing a few other controls) in the toolbar, similar to how iTunes displays playback information.
>
> With our plugins you can have a CustomNSViewMBS there to draw your own stuff.
>
> Greetings
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Canvas in NSToobarMBS
Date: 03.04.13 19:43 (Wed, 3 Apr 2013 20:43:17 +0200)
From: Christian Schmitz

Am 03.04.2013 um 18:47 schrieb William Koperwhats <<email address removed>>:

> The immediate need is to place a canvas (containing a few other controls) in the toolbar, similar to how iTunes displays playback information.

With our plugins you can have a CustomNSViewMBS there to draw your own stuff.

Greetings
Christian