Hi folks, i'm trying to build an app with AMS.
starting from loading a CVS file into a grid, i'm sorting the grid, then read the
within the cells i'm looking for certain values and based on their name i will set visible an image, setting the position.
evrithing works fine till 10 row in the grid. after that the app is slowing down. any suggestion?
thanks in advance
starting from loading a CVS file into a grid, i'm sorting the grid, then read the
within the cells i'm looking for certain values and based on their name i will set visible an image, setting the position.
evrithing works fine till 10 row in the grid. after that the app is slowing down. any suggestion?
thanks in advance
Code:
function disegna_rack () Image.SetVisible("Rack1", true) Grid.Refresh("elenco") fondo=743 lato=43 Grid.LoadFromFile("Grid2", "AutoPlay\\Docs\\modality.txt") Grid.SetVisible("Grid2", false) iColumnCount = Grid.GetColumnCount("elenco"); iRowCount = Grid.GetRowCount("elenco"); for iThisRow = 0, iRowCount do str_ThisCellText = String.Lower( Grid.GetCellText("elenco", iThisRow, 1)); str_nomehost = String.Upper( Grid.GetCellText("elenco", iThisRow, 3)); Etichetta_label = String.Concat("L_", str_ThisCellText); nome_label=String.Concat("N_", str_ThisCellText); Label.SetText(nome_label, str_nomehost) dimensione = Image.GetSize(str_ThisCellText) errore = Application.GetLastError(); if errore == 0 then --dim_label=Label.GetSize(Etichetta_label) --dim_labO=dim_label.Width --dim_labV=dim_label.Height --dimO=dimensione.Width dimV=dimensione.Height --posizione = Image.GetPos(str_ThisCellText) --y=posizione.Y if fondo - dimV < 80 then fondo = 743 lato = 255 Image.SetVisible("Rack2", true) end fondo=fondo-dimV --Dialog.Message("", str_ThisCellText) label_pos=fondo + (dimV/2) - 5 Image.SetPos(str_ThisCellText, lato, fondo) Label.SetPos(Etichetta_label,lato + 20 , label_pos) Label.SetPos(nome_label,lato+60, label_pos) Image.SetVisible(str_ThisCellText, true) Label.SetVisible(Etichetta_label, true) Label.SetVisible(nome_label, true) end end end
Comment