Sviluppatori Basic (e non) per Mobile e Desktop

Forum dedicato agli sviluppatori di B4X, Delphi, Xamarin


Non sei connesso Connettiti o registrati

SD: Panel Extra

Vedere l'argomento precedente Vedere l'argomento seguente Andare in basso  Messaggio [Pagina 1 di 1]

1 SD: Panel Extra il Lun Ott 23, 2017 6:53 pm

Dust

avatar
Admin
Admin
Use CustomViewClass

SD_PanelExtra

Author: Star-Dust
Version: 0.03



    • PanelNavigator

      • Events:

        • ChangePanel (NumberPanel As Int)


      • Fields:

        • BallSize As Int
        • NameDrawable As String


      • Functions:

        • Add (Name As String, Color As Int, Icon As Bitmap) As Int
          Add Name Panel, Color panel, Icon and return index of panel
        • Add2 (Name As String, Color As Int, Icon As Bitmap) As Panel
          Add Name Panel, Color panel, Icon and return panel
        • AddAt (Name As String, Color As Int, Icon As Bitmap, Index As Int) As String
          Add Name Panel, Color panel, Icon at specific position
        • AddMyPanel (Index As Int, Panel As Panel) As String
          PanelNavigator.AddMyPanel(0,Panel3)
        • Class_Globals  As String
        • Clear  As String
          Remove all panel
        • DesignerCreateView (Base As Panel, Lbl As Label, Props As Map) As String
        • GetBase  As Panel
        • GetPanel (Index As Int) As Panel
          Get Panel at Index
        • GetPanelName (Index As Int) As String
          Get Name of Panel
        • GetSelectPanel  As Int
          Get Panel to be Visible
        • GetVisible  As Boolean
        • Initialize (vCallback As Object, vEventName As String) As String
        • Invalidate  As String
          Rewrite all design
        • IsInitialized  As Boolean
          Tests whether the object has been initialized.
        • SetBackGroundColor (Color As Int) As String
          Change color of background
        • SetIcon (Index As Int, B As Bitmap) As String
          Set Icon at panel position
        • SetIconPanelVisible (Visible As Boolean) As String
          Set Visible/Invisible Icon Panel
        • SetLayout (Left As Int, Top As Int, Width As Int, Height As Long) As String
        • SetNamePanelVisible (Visible As Boolean) As String
          Set Visible/Invisible Label with NamePanel
        • setPadding (Left As Int, Top As Int, Right As Int, Bottom As Int) As String
        • SetPanelName (Index As Int, Name As String) As String
          Set Name of Panel
        • SetSelectPanel (Index As Int) As String
          Set Panel to be Visible
        • SetTextColorNamePanel (Color As Int) As String
          Set text Color ofa Name Panel if visible
        • setVerticalScrollbarPosition (v As View, Position As Int) As String
        • SetVisible (Visible As Boolean) As String
        • Size  As Int
          Number of panel insert






    • TitleScrollView

      • Fields:

        • MyScroll As ScrollView
        • MyTitleFull As Panel
        • MyTitleReduced As Panel
        • NoVibration As Int
          Select sensitibity precision. It is used to avoid flickering on some devices 
          Usually it is 15dip, it increases in case of flickering


      • Functions:

        • AddTitleFull (Panel As Panel) As String
        • AddTitleReduce (Panel As Panel) As String
        • Class_Globals  As String
        • DesignerCreateView (Base As Panel, Lbl As Label, Props As Map) As String
        • GetBase  As Panel
        • Initialize (vCallback As Object, vEventName As String) As String
        • IsInitialized  As Boolean
          Tests whether the object has been initialized.







      • Functions:

        • Initialize  
          Initializes the fields to their default value.






File allegati
SD_PanelExtra.zip
Libreria
Non hai il permesso di scaricare i file.
(12 kB) Scaricato 0 volte

Vedi il profilo dell'utente http://basic4x.forumattivo.com

2 Re: SD: Panel Extra il Lun Ott 23, 2017 7:00 pm

Dust

avatar
Admin
Admin
Esempio di PanelNavigator


Codice:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Private PanelNavigator1 As PanelNavigator
    Dim Color() As Int = Array As Int(0xffffffff,0xffc1ffbf,0xff009699,0xffcd1515,0xffa786ee)
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("panelMain")

    For i=0 To 4
        PanelNavigator1.Add(i,Color(i),LoadBitmap(File.DirAssets,(i+1) & ".png"))
    Next

    PanelNavigator1.Add("Name 5",Colors.Blue,Null)
    ' Also
    ' PanelNavigator1.Add2("Name 5",Colors.Blue,Null).LoadLayout("mypanel")
    ' Or
    ' Dim I as int = PanelNavigator1.Add("Name 5",Colors.Blue,Null)
     ' PanelNavigator1.GetPanel(I).LoadLayout("mypanel")

    Dim L As Label
    L.Initialize("")
    L.Gravity=Gravity.CENTER
    L.Text="First Panel"
    L.TextColor=Colors.Black
    L.TextSize=20
    ' Find first panel and Add a Label
    PanelNavigator1.GetPanel(0).AddView(L,0,0,100%x,40dip)
End Sub

[ltr]
Esempio di Scroll Title[/ltr]

Codice:

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("main")
    TitleScrollView1.MyTitleReduced.LoadLayout("reduced")
    TitleScrollView1.MyTitleFull.LoadLayout("full")
  
    TitleScrollView1.MyScroll.Color=Colors.Yellow
    For i= 1 To 30
        Dim Label1 As Label
      
        Label1.Initialize("")
        Label1.Text="Item " & I
        Label1.Textcolor=Colors.Black
      
        TitleScrollView1.MyScroll.Panel.AddView(Label1,0,(i-1)*40dip,100%x,40dip)
        TitleScrollView1.MyScroll.Panel.Height=i * 40dip
    Next
  
End Sub

Vedi il profilo dell'utente http://basic4x.forumattivo.com

Vedere l'argomento precedente Vedere l'argomento seguente Tornare in alto  Messaggio [Pagina 1 di 1]

Argomenti simili

-

» VIDEO XF3 - Extra Factor

Permessi di questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum