In Base, is it possible using a macro to manipulate objects other than forms, labels and fields (controls)? For example, can shapes like rectangles, lines, ellipses, callouts, symbols, stars or images be “seen” in the DOM (I’m referring to the tree of objects in LO as a DOM because it’s the term I’m familiar with as a web developer) and manipulated somehow? For example, if there is a rectangle in a Form, can I access the shape, change its fill & outline, or toggle its visibility based on user actions?
On a somewhat related topic, what is the purpose for every object in a form having a “Name”, “Description” and “Title”? Are these related to the fact that Base uses Writer as it’s layout engine? What I mean is, you can right-click on any label or field in your Form, and two options always exist: Description… and Name… If you click on Name, sometimes buttons and list boxes have names such as "Shape1’ or “Shape3” - but not always. It’s weird that only some objects have a “name.” This is probably meaningless for my original question… but if the “name” was somehow similar to the concept of “id” in HTML/CSS, then perhaps a shape like a rectangle or ellipse could be given a unique name as an identifier and then show up in the LO Base DOM under that name? Wouldn’t that be great.
Another similar question is whether grouped objects can be accessed along with any properties such as visibility. If a whole bunch of fields and labels can be grouped, then given a “name”… then maybe the whole group can be toggled?
Only dreaming, my guess is that these things cannot be done in Base. But one never knows until one asks.
If you are tempted to ask the question “Why?”… It’s because I use rectangles in a visual manner to surround logical groupings of fields, and there are circumstances when I want to show or hide that rectangle along with the fields it visibly contains depending on whether entry in those fields makes sense for particular records, and so on and so forth. For example, if I have an expenses table represented by a form, if the category is “gas,” I would show a group of fields that allows entry of “mileage”, “price per gallon,” etc. But for all other expenses, these fields would be invisible. I know it’s possible to show and hide fields, but what about rectangles and images? I suppose someone could get very creative and insert symbols into a custom font and use those as “images” inside a label and show/hide that. But that doesn’t really serve the rectangle question unless you make the font size HUGE with a rectangle font I bet no one has thought of that before! Total hack.
The only other way to accomplish something similar I can think of is to create a label with no text in it, make it’s fill color the same as the page background color and show/hide it “in front” of the group of things I wish to visibly toggle. But doing this has very strange behavior. Strange things happen if through a macro I change the background color of a text box, and there are things layered above it. The stuff “on top” disappears and doesn’t refresh until you mouse over. Icky.
Sorry for the rambling and “many question” format. If anyone has faced a challenge like this and has a creative solution, I’d be interested to know.