[quote=273601:@Greg O’Lone]As you say, don’t do this. Changes like the one in 2016r1.1 have a high probability of breaking this code.
Could you make two images showing what you expected and what you got, and post them so I can take a look?[/quote]
Well it isnt broken with 1.1 so far… but we cant talk about that here, these examples were not prepared with the .1 release if you know what I mean nudge nudge wink wink say no more…
This is a screen shot from a dynamically generated web interface to the home automation software that we write in Xojo The instantaneous power measurement there is actually coming from an arduino compatible kit that I also sell to read the calibration pulses from your electric meter and send them into the program via an xBee radio or a Wifi interface. I love my job
The label youre interested in is the one that says bandwidth throttled This is a text label locked left and right across the whole page just under the menu bar that only displays if there is a message for the user on the web page. The message is right justified for no good reason other than I liked that. This is what it looks like without any padding which I dont like at all but thats not Xojos fault:
If I add right padding to it via the webStyle then I get this. Which makes sense knowing that the text is a child of the overall control and the style is applied to the parent container. The problem is that the width of the internal element are not relative so they dont adjust and take into account the padding of the parent. Another potential fix would be to adjust the size of the internal child element by moving it right the right padding and reducing its size by the left plus the right padding… Im not sure if there is a way to force the padding from the parent container to fall through to the child without something like that?
I feel that the background should not be affected by the padding, but perhaps Im wrong about that? Maybe that is how CSS works I dont know…
This is how I feel applying padding should make it look and this is the output from my hack above:
when the hack breaks Ill probably switch to using a rect to hold the background and putting the label on top of it with the proper offset… I know that would be a work around that would not break later, but thats not always a simple option. These controls are created with the colored background as a text label with styles applied that change the color and the text orientation. With padding the way it works now it breaks their layout, without any padding the text showing the level or the state is against the border which looks horrid, but with the hack applied they look like this which seems appropriate to me:
I COULD rebuild those with extra text elements in the middle with the proper offsets, but the strangeness with how embedded container controls handle locking and initial size drawing it would mean even more commands at loading to conform the location of everything, not impossible, but adding complexity that I dont feel should be that necessary.