B4A Library [B4X] [XUI] AS TabMenuAdvanced

ivanomonti

Expert
Licensed User
Longtime User
Hello and thank you and for this library that offers a lot of potential, that if I do a good job with it I'll offer you so many coffees that you'll feel nauseous but I found some doubts.

1) disable for example a key at runtime

2) a space key wouldn't hurt, for example put 5 buttons and fill the length of the screen, but if you put two they stay in the center, but if I put three, one on the left and two at the bottom right? the thing becomes almost impossible, at this point a disable key that takes up space of two buttons would be the solution.



3) Another thing that I don't know if it can be done and make sure that there is a click and not a selection, let me explain when I select an item it remains selected, I would like it to behave like a button and not like a switch.

button (click)
switch (off)(on)

-------------------------------------------------------------------------------- italiano --------

Ciao e grazie e per questa libreria che offre molte potenzialità, che se faccio un buon lavoro con essa ti offro tanti caffè da aver la nausea ma ho trovato alcuni dubbi.

1) disabilitare ad esempio un tasto a runtime
2) non ci starebbe male un tasto space, esempio metti 5 bottoni e riempi la lungezza dello schermo, ma se ne metti due stanno al centro, ma se ne metto tre di cui uno a sx e due in fondo a destra? la cosa diventa quasi impossibile, a questo punto un tasto disable che prenda spazio di due bottoni sarebbe la soluzione.



3) Altra cosa che non so se si può fare e fare in modo che ci sia il click e non selezione, mi spiego quando seleziono una voce rimane selezionata, a me piacerebbe che si comportasse come un pulsante e non come interruttore.

pulsante (click)
interrutore (off)(on)
 

Alexander Stolte

Expert
Licensed User
Longtime User
I don't quite understand what the point of this is supposed to be?
Should none of the tabs be selected and only be selected when the user clicks on one and if this clicks again the same, then the selection should disappear?
1) disable for example a key at runtime
B4X:
AS_TabMenuAdvanced1.GetTab(0).xTab.Enabled = False
AS_TabMenuAdvanced1.Refresh
 

ivanomonti

Expert
Licensed User
Longtime User

no, it remains selected, I try again and I send you a screen, as you can see the red parts highlight the brighter text because it has been selected, in reality it should be like all the others.

I don't use icons but only text at the moment, and there's already too much stuff

 

ivanomonti

Expert
Licensed User
Longtime User
Error:
Error occurred on line: 287 (AS_TabMenuAdvanced)


code:
    AS_TabMenuAdvanced_main_social.AddTab("MIASmart",Null,Null)
    AS_TabMenuAdvanced_main_social.AddTab("",Null,Null)
    AS_TabMenuAdvanced_main_social.AddTab("New Post",Null,Null)
    AS_TabMenuAdvanced_main_social.AddTab("Load Post",Null,Null)
    AS_TabMenuAdvanced_main_social.Refresh
    AS_TabMenuAdvanced_main_social.GetTab(1).xTab.Enabled = False
    AS_TabMenuAdvanced_main_social.Refresh
 

Alexander Stolte

Expert
Licensed User
Longtime User
no, it remains selected, I try again and I send you a screen, as you can see the red parts highlight the brighter text because it has been selected, in reality it should be like all the others.
And why don't you just set the selection color to the same color as the unselected color?
 

Alexander Stolte

Expert
Licensed User
Longtime User
man, anyway I find it a flaw, I need to have the possibility to make an elastic space between the buttons, mmm for the rest and a great job, it can be improved but it's great
On tablets you usually have such a gap on the sides, but no idea how to calculate something like that. The workaround with 2 disabled tabs is quite good.
 

ivanomonti

Expert
Licensed User
Longtime User
On tablets you usually have such a gap on the sides, but no idea how to calculate something like that. The workaround with 2 disabled tabs is quite good.
true but if you use 5 buttons by default the problem is solved simply also because maybe I would like a large button so that you can see it immediately, anyway yes, I used two empty buttons and bona there
 

ivanomonti

Expert
Licensed User
Longtime User
you haven't thought about the size of the numbers, moreover the background is cut by the next index, nice round but you mustn't go beyond the decimal mmmm, if I use height 50 or 60 that background is cut and here it's 70 but too high.

 

Sergio Haurat

Active Member
Licensed User
Longtime User
Hi @Alexander Stolte, your work is incredible! I can't find a way to leave an icon by default, for example:
Selected as default at start:
Dim AS_TabMenuAdvanced1 As AS_TabMenuAdvanced
'
' more code...
'
AS_TabMenuAdvanced1.GetTab(0).xTab.Default = True
Thank you
 

Sergio Haurat

Active Member
Licensed User
Longtime User
??????????

I am attaching some images to see if you can understand me better

App Normal Start Application after button pressed




Is there a property that allows me to display one of the default options without having to go and click?

This is what I mean by this imaginary line of code

AS_TabMenuAdvanced1.GetTab(0).xTab.Default = True
 

byz

Active Member
Licensed User

good job man, its so nice. i used it, the FontToBitmap is great to me,because i create image just soso. thanks agin Alexander Stolte.
this is my code
add title and icon:
    AS_TabMenuAdvanced1.AddTab("后退",AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE5C4),True,35,xui.Color_White),AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE5C4),True,35,xui.Color_White))
    AS_TabMenuAdvanced1.AddTab("前进",AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE5C8),True,35,xui.Color_White),AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE5C8),True,35,xui.Color_White))
    AS_TabMenuAdvanced1.AddTab("主页",AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE88A),True,35,xui.Color_White),AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE88A),True,35,xui.Color_White))
    AS_TabMenuAdvanced1.AddTab("搜索",AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE8B6),True,35,xui.Color_White),AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE8B6),True,35,xui.Color_White))
    AS_TabMenuAdvanced1.AddTab("分享",AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE80D),True,35,xui.Color_White),AS_TabMenuAdvanced1.FontToBitmap(Chr(0xE80D),True,35,xui.Color_White))
    AS_TabMenuAdvanced1.Index=(2)
    AS_TabMenuAdvanced1.Refresh
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…