Sub Initialize
'establish a reference to the app
vuetify = pgIndex.vuetify
'initialize the component
clienti.Initialize(Me, name)
path = clienti.path
'load the template
banano.LoadLayout(vuetify.PlaceHolderName, "vclienti")
vclienti.Matrix(1, 1).LoadLayout("vtableclienti")
vclienti.Matrix(2, 1).LoadLayout("vmenuclienti")
vclienti.Matrix(3, 1).LoadLayout("vclienticontainer")
txtcognome = BVAD3.NewTextField(clienti, "txtcognome", "Cognome", "Cognome ", "cognome", False, "", 0, "", CreateMap( "hide-details":True,"background-color":"blue lighten-4","outlined" : True))
vclienticontainer.Matrix(1, 1).Append(txtcognome.GetHTML)
txtnome = BVAD3.NewTextField(clienti, "txtnome", "nome", "Nome ", "", False, "", 0, "Nome", CreateMap( "hide-details":True,"tile": True, "outlined" : True ))
vclienticontainer.Matrix(1, 2).Append(txtnome.GetHTML)
Dim txtindirizzo As BANanoElement = BVAD3.NewTextField(clienti, "txtindirizzo", "indirizzo", "indirizzo", "", False, "", 0, "", CreateMap( ":ide-details":True,"tile": True ,"outlined" : True ))
vclienticontainer.Matrix(1, 3).Append(txtindirizzo.GetHTML)
Dim txtcitta As BANanoElement = BVAD3.NewTextField(clienti, "txtcitta", "citta", "Città", "", False, "", 0, "", CreateMap( "hide-details":True,"outlined" : True))
vclienticontainer.Matrix(2, 1).Append(txtcitta.GetHTML)
Dim txtprovincia As BANanoElement = BVAD3.NewTextField(clienti, "txtprovincia", "pv", "Provincia ", "", False, "", 0, "Nome", CreateMap( "hide-details":True,"outlined" : True ))
vclienticontainer.Matrix(2,2).Append(txtprovincia.GetHTML)
Dim txtCap As BANanoElement = BVAD3.NewTextField(clienti, "txtcap", "cap", "Cap", "", False, "", 0, "", CreateMap( "hide-details":True,"outlined" : True))
vclienticontainer.Matrix(2, 3).Append(txtCap.GetHTML)
'' '
vtableclienti.AddColumn1("name", "Nominativo", vtableclienti.COLUMN_TEXT, 0, False, vtableclienti.ALIGN_LEFT)
'ableclienti.AddChip("calories", "Calories", "item.color")
vtableclienti.AddColumn("Indirizzo", "Indirizzo")
vtableclienti.AddColumn("Cap", "cap")
vtableclienti.AddColumn("Citta", "città")
vtableclienti.AddColumn("Pv", "Pv")
' vtableclienti.AddAction("mashy", "Mashy", "mdi-vuetify")
vtableclienti.AddEdit
vtableclienti.AddDelete
vtableclienti.AddClone
' vtableclienti.AddPrint
'vtableclienti.AddSave
'vtableclienti.AddCancel
'vtableclienti.AddDownload
vtableclienti.AddMenuV
vtableclienti.SetIconDimensions("edit", "", vuetify.COLOR_GREEN)
vtableclienti.SetIconDimensions("delete", "", vuetify.COLOR_RED)
vtableclienti.SetIconDimensions("clone", "", vuetify.COLOR_AMBER)
vtableclienti.SetIconDimensions("print", "", vuetify.COLOR_BLUE)
vtableclienti.SetIconDimensions("save", "", vuetify.COLOR_BLUEGREY)
vtableclienti.SetIconDimensions("cancel", "", vuetify.COLOR_BROWN)
vtableclienti.SetIconDimensions("download", "", vuetify.COLOR_CYAN)
vtableclienti.SetIconDimensions("menu", "", vuetify.COLOR_INDIGO)
vtableclienti.SetIconDimensions("mashy", "", vuetify.COLOR_DEEPPURPLE)
'add data
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione 1", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione 2", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione 3", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione 4", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione 5" , "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
vtableclienti.AddRow(CreateMap("name": "Raffaele Viglione", "Indirizzo": "Via Roma 8", "Cap":"86100", "Citta": "Campobasso", "Pv": "CB", "protein": 4.0, "iron": "1%"))
' menu clienti
Dim btnnuovo As BANanoElement = BVAD3.NewButtonIconRight(buttons, "btnnuovo", "Aggsssiungi", "mdi-plus", "primary", True, Null,CreateMap( "hide-details":False,"outlined" : True)) ''CreateMap("x-samll":True,"my":"2"), CreateMap("x-samll":True,"my":"2"))
vmenuclienti.matrix(1, 1).Append(btnnuovo.GetHTML)
Dim btnmodifica As BANanoElement = BVAD3.NewButtonIconRight(buttons, "btnmodifica", "Modissfica", "mdi-plus", "indigo", True, Null,CreateMap( "hide-details":True,"outlined" : True))
vmenuclienti.matrix(1, 2).Append(btnmodifica.GetHTML)
' '
clienti.BindVueTable(vtableclienti)
'add the placeholder content to the template
clienti.AppendPlaceHolder
'add the component as a router
vuetify.AddRoute(clienti)
End Sub