B4J Question B4J color B4XView

ivanomonti

Expert
Licensed User
Longtime User
I am creating a dynamic menu using B4Xview panels as per code, but I would like them to keep the colors inherited or set from the primary panel (dark)

Also I was wondering if I can use the B4XView with more B4XCanvas, as if the B4XCanvas themselves were tissue but I find it difficult

example

panel (B4XView)
first layer (B4XCanvas) grid
second layer (B4XCanvas) ruler
third layer (B4XCanvas) DrawLine...

So you can draw only on the third layer without having to regenerate grid and righ


B4X:
        Dim pnTeam As B4XView = Main.xui.CreatePanel("")
        pnTeam.Color  = Main.xui.Color_ARGB(255,29,29,29)
        pnTeam.Width=128
        pnTeam.Height=30
        Dim svTeam As ScrollPane
        svTeam.Initialize("")
        svTeam.InnerNode=pnTeam
        svTeam.SetVScrollVisibility("ALWAYS")
        svTeam.SetHScrollVisibility("NEVER")
        menuTools.AddView(svTeam,0,428,128,200)

2020-04-14_144817.jpg
 

Attachments

  • 2020-04-14_131837.jpg
    2020-04-14_131837.jpg
    72.7 KB · Views: 245
  • 2020-04-13_215722.jpg
    2020-04-13_215722.jpg
    61 KB · Views: 246

ivanomonti

Expert
Licensed User
Longtime User
Why are you making things more complicated than they should be...
You should use xCLV here.
If you want the list to be transparent: https://www.b4x.com/android/forum/t...d-and-scrollbar-visibility.101740/post-638776

You can put a panel over another one (not inside) and add a B4XCanvas to each one.

so you're telling me that if I want to make a grid, a ruler, a canvas where I can create lines I have to use three panels where each panel has its own canvas and superimpose all the panels as if it were shiny paper (transparent)
 
Upvote 0
Top