this doesn’t really apply to Xojo (yet) as AL is used only in the iOS product (for now)… but the question might become more relavant if/when AL comes to Desktop.
But in anycase, I’m trying to get a handle on simple basic generic Autolayout
Suppose one wanted to duplicate the LockLeft/Top/Right/Bottom feature… should be a simple thing.
for Left and top…
you would set a “left constraint” that is X units from the screen left side and a “top constraint” that is Y units from the top… so when the window was resized the Left and Top would stay in place
but what would the proper values be for right and bottom?
I would think that it would be
Greg… here is a question that relates directly to Xojo, and I’m asking for educational purposes (I like to know how things work)
For Xojo controls locks (left/top/right/bottom) and I correct in assuming that Xojo does NOT invoke autolayout constraints in the compiled code. The reason I make this assumption is (all related to DESKTOP not to iOS)
Autolayout came out long after Xojo/RealBasic did
Autolayout is (or so it seems) to be limited mostly to macOS type code
If that is true what does Xojo do behind the scenes to provide this function? Its a rather simple scheme (lock one or more sides of the control to the corresponding side of the container (window or groupbox etc)
I thought I’d teach myself about AL by trying to duplicate something I already knew about. And the strange thing is I have something that works… But… if I lock the right and/or bottom of Control B, then Control A freaks out . Note , since I’m trying to learn AL, I’m not doing this in Xojo at the moment, but since it seems AL is the “future” I want to be prepared.
I have 6 constraints… Left/Top/Right/Bottom/Height/Width
Height and Width are active… UNLESS both Left/Right or Top/Bottom are active
A thought experiment… trying to figure out how AL constraints work and interact with each other… To be honest… have No idea what a “cassowary-style” solver would be
Huh, dèjávu. Just before that paper was published, I did a class in grad school, taught by Alan Borning and Greg Badros was the TA. Two of us created a constraint solver in Java for generic layout issues. Who knew.