Logo in WebToolbar

Hello All! I am curious if it is possible to put a logo in the webtoolbar? I like the idea of using the toolbar but it is in awkward place, but I think adding a logo to it would solve the hesitation I have.

Has anyone successfully done this? If so, how?

Thank you

I think WebToolbar.Icon is probably what you’re looking for. Eddie’s Electronics sample application uses an icon in the toolbar.

I have been playing with icons but I cant figure out how to draw my own instead of using bootstrapicons.

1 Like

Ah, no, don’t worry, the Icon for WebToolbar is just a plain image. Drop an image into the IDE and just reference it from the code.

1 Like

Here is how the code looks like in Eddie’s Electronics example:

6 Likes

I cant believe I overlooked that. Thank you. Now for some custom css to resize the logo icon.

Thanks again

1 Like

It is a shame that web2 is not WYSIWYG, but, you can use hacks and workarounds.
You can use a WebImageViewer to display your logo and then the webtoolbar.

The Xojo shortcoming is that the webtoolbar cant be resized in the IDE but the workarouns is to modify directly the position in the Style, add this in the opening event of the webtoolbar

Me.Style.Value("left") = "56px"

image

This way you are not limited by the margin and padding of the navbar

It’s always nice when someone goes to the length to show you rather than simply tell you how to figure it out. Nice work Ricardo.

4 Likes