Button in Calc to open a graphic image?

Likely a simple enough question, but still beyond my fumbling around. How can I create a button in Calc that when clicked on will open a graphic image (possibly having the button invoke an external file viewer), or maybe opening up the image associated with that button in a field in the spreadsheet? Thanks!

Hallo

=HYPERLINK("/path/to/the/image")

Tried that… doesn’t work. Click on the cell containing the created link, it just becomes the “focus,” and doesn’t otherwise do a thing.

hold ctrl key on click

One more example. :slightly_smiling_face:

= HYPERLINK("https://ask.libreoffice.org/u/kharrisma"; "kharrisma")

Nope. Click or CTRL + click just puts the focus on that cell as it would for any other cell. Wondering if I need a macro to open a file viewer?

Here is a sample document: a button with URL (without any Macros):
Button_URL.ods (9.6 KB)
.
Of course you can assign your own macro - what will launch a Viewer - to a Button EVENT.

Okay, that’s good, and kind of what I’m shooting for, but it’s not especially helpful as anything other than a demonstration. Impressive, but I can’t click on it to see how it’s put together and ‘reverse-engineer’ it so I can create my own. Won’t allow a right-click either. Still leaves me looking for how to actually create an active button that performs a specific action, rather than as an object that ‘takes focus’ when I click on it.

Actually you can, just didn’t know how to do it until now.
First of all, activate Design Mode.
image
Now right-click the button and select Control Properties
image
Now, as @Zizi64 said, scroll down the options window to the URL

Change the value to path and file name. Turn off Design Mode. Click the button.
To create the same button yourself, use the Insert - Hyperlink - Document command

1 Like