LucaMs Expert Licensed User Longtime User Oct 4, 2016 #1 I think that some Designer's features similar to those of MS VS may be useful; like: 1) anchor set to None 2) MinimumSize and MaximumSize 3) anchoring by code https://www.b4x.com/android/forum/threads/designer-anchors-video-example.36507/#post-367800
I think that some Designer's features similar to those of MS VS may be useful; like: 1) anchor set to None 2) MinimumSize and MaximumSize 3) anchoring by code https://www.b4x.com/android/forum/threads/designer-anchors-video-example.36507/#post-367800
Cableguy Expert Licensed User Longtime User Oct 4, 2016 #2 A thought on number one... No anchors is just not possible... Why? Because any view is placed relative to a 0 (zero) point, usually set by the views parent. A view with no anchors would have to have a meaningless left and top values... Which is... Impossible! Default anchors are top and left, because it's where the parents zero points are!
A thought on number one... No anchors is just not possible... Why? Because any view is placed relative to a 0 (zero) point, usually set by the views parent. A view with no anchors would have to have a meaningless left and top values... Which is... Impossible! Default anchors are top and left, because it's where the parents zero points are!
LucaMs Expert Licensed User Longtime User Oct 4, 2016 #3 Cableguy said: No anchors is just not possible Click to expand... LucaMs said: similar to those of MS VS Click to expand... that is, it is possible; and also it is useful to get the result you can see here.
Cableguy said: No anchors is just not possible Click to expand... LucaMs said: similar to those of MS VS Click to expand... that is, it is possible; and also it is useful to get the result you can see here.
Cableguy Expert Licensed User Longtime User Oct 4, 2016 #4 LucaMs said: that is, it is possible; and also it is useful to get the result you can see here. Click to expand... as said in the linked page, they are "anchored to the nearest boundary", so none doesn't really exist!
LucaMs said: that is, it is possible; and also it is useful to get the result you can see here. Click to expand... as said in the linked page, they are "anchored to the nearest boundary", so none doesn't really exist!
LucaMs Expert Licensed User Longtime User Oct 4, 2016 #5 Cableguy said: as said in the linked page, they are "anchored to the nearest boundary", so none doesn't really exist! Click to expand... It exists and it is useful in the case I linked. Try to obtain the layout I published there without a designer's script. It does not means that the View will stay anchored to the nearest boundary (which should mean mantaining a fixed distance from); the View will be placed at a proportional distance from all boundaries (edges?).
Cableguy said: as said in the linked page, they are "anchored to the nearest boundary", so none doesn't really exist! Click to expand... It exists and it is useful in the case I linked. Try to obtain the layout I published there without a designer's script. It does not means that the View will stay anchored to the nearest boundary (which should mean mantaining a fixed distance from); the View will be placed at a proportional distance from all boundaries (edges?).
klaus Expert Licensed User Longtime User Oct 4, 2016 #6 I don't understand. What do you expect with anchor none? How should the view be positioned? You have LEFT, RIGHT and BOTH what is NONE supposd to do different from LEFT?
I don't understand. What do you expect with anchor none? How should the view be positioned? You have LEFT, RIGHT and BOTH what is NONE supposd to do different from LEFT?
LucaMs Expert Licensed User Longtime User Oct 4, 2016 #7 Please, try to realize the layout as I did (at that time) using VS AND AS I POSTED THERE: The three central buttons have anchor set to None, so they remain at center even if you change the form size. Last edited: Oct 4, 2016
Please, try to realize the layout as I did (at that time) using VS AND AS I POSTED THERE: The three central buttons have anchor set to None, so they remain at center even if you change the form size.
klaus Expert Licensed User Longtime User Oct 4, 2016 #8 Again, NONE means nothing. In your case you should ask for anchor CENTER that's what you ask in your example.. Then how should Button5 and Button6 be placed? With a distance to the CENTER or %x to the center? Distance of Left, Middle or right to the center? That's why I say that NONE means nothing.
Again, NONE means nothing. In your case you should ask for anchor CENTER that's what you ask in your example.. Then how should Button5 and Button6 be placed? With a distance to the CENTER or %x to the center? Distance of Left, Middle or right to the center? That's why I say that NONE means nothing.
LucaMs Expert Licensed User Longtime User Oct 4, 2016 #9 klaus said: Again, NONE means nothing. Click to expand... Well, say it to Microsoft klaus said: In your case you should ask for anchor CENTER Click to expand... That was an example. However in that example there isn't a View at center, but 3 views which "mantain proportional distances from the 4 edges". If you use MS VS you can try and see how it works and what I mean. b4a - central buttons with default anchoring (top-left) Last edited: Oct 5, 2016
klaus said: Again, NONE means nothing. Click to expand... Well, say it to Microsoft klaus said: In your case you should ask for anchor CENTER Click to expand... That was an example. However in that example there isn't a View at center, but 3 views which "mantain proportional distances from the 4 edges". If you use MS VS you can try and see how it works and what I mean. b4a - central buttons with default anchoring (top-left)
Erel B4X founder Staff member Licensed User Longtime User Oct 5, 2016 #10 Anchors are simple and useful. They are not supposed to solve all problems. This is exactly why there is also a built-in designer script engine. You can easily implement such a layout with the designer script. You can also set the minimum width and height with the designer script: Code: Copy 'set min width Button1.Width = Max(Button1.Width, 30dip) 'or Button1.Width = Max(Button1.Width, Panel2.Width / 3) 'or If ActivitySize < 5 Then mw = 30dip Else mw = 60dip Button1.Width = Max(Button1.Width, mw) For further discussions please start a new thread in the questions forum.
Anchors are simple and useful. They are not supposed to solve all problems. This is exactly why there is also a built-in designer script engine. You can easily implement such a layout with the designer script. You can also set the minimum width and height with the designer script: Code: Copy 'set min width Button1.Width = Max(Button1.Width, 30dip) 'or Button1.Width = Max(Button1.Width, Panel2.Width / 3) 'or If ActivitySize < 5 Then mw = 30dip Else mw = 60dip Button1.Width = Max(Button1.Width, mw) For further discussions please start a new thread in the questions forum.
LucaMs Expert Licensed User Longtime User Oct 5, 2016 #11 I know that the script engine is useful and that I can use it to solve many problems. This was only a "Wish post"
I know that the script engine is useful and that I can use it to solve many problems. This was only a "Wish post"