Wish Consistent way to set height and width of widgets

DIYMicha

Member
Hey there,
BASIC is meant to be easy and intuitive. So why is there no .top .left .height .with in the newer cross platform widgets? I mean, it is possible to resize the widget in runtime via code, but its mostly hidden under some unintuitive .mbase .base .sv .asview underconstructions. That makes for a lot confusing, guessing, forum-reading, frustration. So why not keeping the BASIC legacy and make it basic?

Adding something like:

B4X:
xCustomView.Top =
xCustomView.Left =
xCustomView.Height =
xCustomView.Width =
xCustomview.InnerSize = (for both scroll directions)

In connection with a wrap_content functionality won't be a huge afford to implement to the compiler, but keeps developers from frustration. And hour long trial and error excursions. The existing commands won't be affected by this changes and stay live in case somebody needs to change deeper parameters.
The neccesary changes to make those easy parameters work could be done by the compiler under the hood.

All this goes for customview or bbtextview boxes.

Another thing is that the BBCustomView reacts very sensitive to unknown commands. As soon as something unknown comes along in square brackets it makes the app crash furiously. Couldn't there be a method to ignore unknown commands? First of all the infamous command [i][/i], which is a very often used one. Is it that complicated to implement it to the library? I mean, it works anyway, but needs a comparatively huge workaround:

B4X:
TextEngine.CustomFonts.Put("italic",xui.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_ITALIC), 10)) 'size not important
...[font = italic][/font]...

This is not to diss the b4x developers. Hell, no. I think you're doing a great job in making it possible for some elderly men like me, who started programming with the old c64 BASIC back in the mid 80s, to nowadays write apps for all sorts of platforms. But I think if it is called BASIC it most certainly should be basic and intuitive. And as soon as I'm not broke anymore, I will sure donate some $$.

Thanks & regards
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Take your time and learn a bit about custom views.
2. The programming language name is B4X, not BASIC.
3. As I already told you, there is no view named bbtextview.
4. There is no view named BBCustomView.
5. I already explained how to escape raw text with BCTextEngine. Why are you repeating this statement here???
6. Custom views expose the internal panel with the mBase field. In most cases you can use it to resize and move the view. Resizing is not always possible and not always trivial.
 
Last edited:
Top