Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6070 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

GetLayoutObjectAttribute("blue_box";"bounds") returns the bounds of a manually drawn square named "blue_box" (e.g. 99 82 919 182 0).

But how do I alter these bounds, for example with data out of 5 number fields. It would be great if there was a function like:

PutLayoutObjectAttribute("blue_box"; var_1, var_2, var_3, var_4, var_5)

I made a sample in PHP of what I want to accomplish in Filemaker: http://www.arubaserver.com/beta/window/

Please comment.

Posted

You just answered your own question: use web publishing or a web viewer on a layout. FileMaker objects can't be resized programmatically.

Perhaps this example will give you some ideas.

Posted

But then, will the filemaker webviewer resize according to the size of the generated image?

Wouldn't this be a great feature though, to include resizing layout objects from scripts or calculation fields?

Posted

Direct link in the filemaker webviewer field to:

http://www.arubaserver.com/beta/window/window.php?w=60&h=120&t=1&o=l&c=9

doesn't work either...

Posted

Wouldn't this be a great feature though, to include resizing layout objects from scripts or calculation fields?

It sure would. It would be nice to be able to programatically control all of the attributes of objects but I'm not sure our friends at FM will be heading in this direction anytime soon.

FM Pro seems to be aimed at regular folks who have a need for simple databases that they can build on their own. Being able to have total programatic control over object attributes probably isn't something that the average FM developer needs but obviously full-time FM developers could put such a feature to good use.

Posted

Your link doesn't show anything (or do anything) in a regular browser either, so...

In any case, you cannot programmatically* resize a layout object - including a web viewer. You can only resize objects SHOWN IN a web viewer.

---

(*) as opposed to resizing automatically when the window is resized.

Posted

All at http://www.arubaserver.com/beta/window/ works fine.

The generated image though needs to be inside tags, otherwise it downloads right away and is not displayed in the browser.

Posted

Don, your URL is generating an image file that my browser asks to download. You could make that work, but you said it yourself, it won't work as is in a browser, so it's not going to work as is in a FileMaker web viewer.

Did you check out the example I linked above? I know it's not a work of art, but it seems to me it would be less overhead than your method. It doesn't require a server or even a separate web page file.

Are you from Aruba? I went there once long ago.

Posted

I got it to work... ;-)

I made a new page where the image is embedded in html. (http://www.arubaserver.com/beta/window/test.php?w=80&h=120) Apparently it does NOT work if you either

- make a direct link to the image

or

- generate the html with the embedded image WITHIN Filemaker

So a Filemaker field named 'URL' where a calculated result is

"http://www.arubaserver.com/beta/window/test.php?w=80&h=120" does work flawless. (the '80' and '120' are set vars copied from manuel input fields within Filemaker)

Although this does open doors for me, it would still be way better if Filemaker came up with either "PutLayoutObjectAttribute( "blue_box"; var_1, var_2, var_3, var_4, var_5)" or "SetLayoutObjectAttribute( "blue_box"; var_1, var_2, var_3, var_4, var_5)".

If anybody needs a simple (or complex) PHP image creator let me know...

Keep posting.

Ooh, and yes. I live in Aruba. Actually ON Aruba since it's an island ;-). And we just had a 4.5 Earth Quake, weird feeling.

Posted

I'm glad you got it working. You never did say what your actual use for this is, or whether you ever looked into my CSS example.

If you do think PHP is the way to go, you may be interested in checking out SmartPill.

Posted

I'm making a quotation app for a window fabricator... I need a scaled image of the window as an extra to the name and description. It's still not perfect as the Filemaker webviewer does not scale to the image size.

I will look closer into the CSS option also, although you cannot create diagonals with that (I think).

Thanks.

Posted (edited)

One more thing...

What would be the purpose of naming objects (circles, squares, etc. - you can in the 'View' -> 'Object' pane) if you can't really do anything with it (besides reading it's 'bounds'). But why would one want to know an objects bounds anyway? For example you can not really act upon it by means of an If/Then/Else statement. This feature would have SO MUCH more value if it was the other way around, writing instead of reading.

Is there a way we can submit this feature to FileMaker?

I made a poll, please vote!

Edited by Guest
Posted

Made an ever better solution with a local html file and javascript...

Dynamic input of color, width and height. Very nice!

Only need to replace the "file:///Users/michiel/Desktop/chart/chart.html" for your file path location. (This can probably be automatically, but for now just copy-past your path).

http://www.fmforums.com/attachments/uploads/1207973048-chart.jpg

Comments welcome.

URL: http://www.arubaserver.com/beta/chart/chart.html?w=800&h=500&c=ffaa30

chart.zip

This topic is 6070 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.