B4J Library jdashboardUI Improve the graphic interface of your desktop applications

fernando1987

Active Member
Licensed User
Breaking News! Unveiling JDashboardUi Version 20!

Hello, B4X Community! Get ready to ignite your development journey with the newest iteration of the JDashboardUi library - Version 20! Prepare for an enhanced toolkit packed with cutting-edge features, optimizations, and enhancements. Here's a sneak peek into what awaits:

Effortless Upgrades: Existing users can smoothly transition to Version 20 by logging into their user panel on our store and accessing the latest release from the "Recent Orders" section. Upgrade seamlessly, with no hassle whatsoever!

Get ready to revolutionize your development process with JDashboardUi Version 20- It's innovation unleashed!
 

fernando1987

Active Member
Licensed User
A new Swift view was added to the library, like all views, it can be added from code


code example:
#Region Project Attributes
    #MainFormWidth: 1200
    #MainFormHeight: 700
#End Region

Sub Process_Globals
    Private fx As JFX
    Private frm As Form
    Private xui As XUI

    
    Dim UI As jdashboard_WindowsStyle2

    
    
    Dim p As JSwich

    Private JSwich1 As JSwich
    
End Sub
Sub AppStart (Form1 As Form, Args() As String)
    frm.Initialize("frm", 1200, 700)
    frm.SetFormStyle("UNDECORATED")
'   
    UI.Initialize(Me, frm, "DUI", fx.Colors.ARGB(250,53, 53, 53))
    
    
    UI.Title.Text = "Example app"
    UI.titlestyle(xui.Color_Transparent)
    UI.Title.TextColor = fx.Colors.White
    frm.Title = "Example app"
    'icon
'    DUI.SetIcon(fx.LoadImage(File.DirAssets,"icons8_translate_app_480px.png"))
'   frm.Icon = fx.LoadImage(File.DirAssets, "icons8_translate_app_480px.png")
'   
    ' Button setup...
    Dim btnClose As Button
    btnClose = UI.ButtonAdd("")
    btnClose.TextColor = fx.Colors.White
    jdashboardUtils.ButtonSeticon(btnClose, Chr(0xE14C), fx.Colors.White, fx.CreateMaterialIcons(22), fx.Colors.Transparent, "LEFT")
    UI.ButtonBindToAction(btnClose, UI.ACTION_EXIT)
    jdashboardUtils.ToolTip2(btnClose, "Exit application", fx.DefaultFont(12),fx.CreateMaterialIcons(24),Chr(0xE14C), fx.Colors.RGB(229, 59, 82))
    btnClose.Tag = "close"
'   
    Dim btnMaximize As Button
    btnMaximize= UI.ButtonAdd("")
    jdashboardUtils.ButtonSeticon(btnMaximize, Chr(0xE069), fx.Colors.White, fx.CreateMaterialIcons(22), fx.Colors.Transparent, "LEFT")
    UI.ButtonBindToAction(btnMaximize, UI.ACTION_MAXIMIZE)
    jdashboardUtils.ToolTip2(btnMaximize, "Maximize the application", fx.DefaultFont(12),fx.CreateMaterialIcons(24),Chr(0xE069), fx.Colors.RGB(87, 203, 197))
'   
     Dim btnMinimize As Button
    btnMinimize = UI.ButtonAdd("")
    jdashboardUtils.ButtonSeticon(btnMinimize, Chr(0xE15B), fx.Colors.White, fx.CreateMaterialIcons(22), fx.Colors.Transparent, "LEFT")
    UI.ButtonBindToAction(btnMinimize, UI.ACTION_MINIMIZE)
    jdashboardUtils.ToolTip2(btnMinimize, "Minimize the application", fx.DefaultFont(12),fx.CreateMaterialIcons(24),Chr(0xE15B), fx.Colors.RGB(46, 193, 220))

    UI.BorderWidth = 5
''    DUI.Inershadow = fx.Colors.RGB(95, 96, 137)
'    DUI.AnimationsActivated = False

    UI.MenuType = UI.No_menu
'

    UI.RootPane.LoadLayout("Layout1")
    frm.Show
    
    
    p.Initialize(Me,"p")
    
    p.AddToParent(UI.RootPane,50dip,85dip,200dip,30dip,True,0xFFB1B0B0,0xFF509A5A,"Ios",0xFFB1B0B0,14,True)
    p.setIcons(fx.CreateFontAwesome(13),Chr(0xF179),Chr(0xF17B))
    p.Iconsize = 18
    

End Sub


Private Sub JSwich1_CheckedChange(Checked As Boolean)
    Log(Checked)
    
    
End Sub

Private Sub p_CheckedChange(Checked As Boolean)
    Log(Checked)
    If Checked Then
        p.Text = "Ios"
        p.TextColor = 0xFFB1B0B0
    Else if Checked = False Then
        p.Text = "Android"
        p.TextColor = 0xFF509A5A
    End If
End Sub
 

fernando1987

Active Member
Licensed User
Add views to the title bar.


Example:
Try    
    
        ' Agregar tus componentes al panel aquí
        Dim label1 As Label
        Dim label2 As Label
        Dim btnsearch As jButton
        Dim label3 As Label
        Dim search1 As jbtflotaing_search
        Private searchResults As List ' Lista de índices de filas que coinciden con la búsqueda
        Private currentResultIndex As Int ' Índice del resultado actualmente seleccionado


        btnsearch.Initialize(Me, "btnsearch")
        label1.Initialize("next")
        label2.Initialize("previus")
        label3.Initialize("")
        search1.Initialize(Me, "search_text")
           
        
        search1.AddToParent(UI.panelbar,"",Main.loc.localize("word"),30,10,300,25,xui.Color_RGB(67, 76, 94),xui.Color_White,xui.Color_Gray,11,False,True,1,xui.Color_RGB(67, 76, 94))
        search1.setIcon(xui.CreateFontAwesome(20),Chr(0xF040))
        search1.CornerRadius = 5
        search1.Text= Main.setting.get("search")
        
        btnsearch.AddToParent(UI.panelbar,350,10,100,30,2,12,Main.loc.localize("Search"),fx.Colors.White,xui.Color_RGB(89, 160, 211),xui.Color_RGB(89, 160, 211),"TL_BR",5)
        btnsearch.ButtonSeticon(Chr(0xF002),fx.Colors.RGB(181, 220, 251),fx.CreateFontAwesome(18),"LEFT")
        label1.Font = xui.CreateFontAwesome(20)
        label2.Font = xui.CreateFontAwesome(20)
        label1.TextColor = fx.Colors.RGB(140, 206, 239)
        label2.TextColor = fx.Colors.RGB(140, 206, 239)
        label1.Text = Chr(0xF063)
        label2.Text = Chr(0xF062)
        label3.Font = xui.CreateDefaultBoldFont(14)
        label3.TextColor = fx.Colors.RGB(213, 210, 245)
        label3.Alignment = "CENTER"
        
        If searchResults.Size > 0 Then
            label3.Text = (searchResults.IndexOf(searchResults.Get(currentResultIndex)) + 1)  &"/"&searchResults.Size
        Else
            label3.Text = "0/0"
        End If
        
        'add
         UI.panelbar.AddView(label3,460,10,60,25)
         UI.panelbar.AddView(label1,530,10,30,25)
        UI.panelbar.AddView(label2,560,10,30,25)
            
    
Catch
    Log(LastException)
End Try
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…