PDA

View Full Version : listbox help...


jackdaniels
12-25-2008, 02:15 AM
i dont know what i am doing wrong, i need help !!! trying to add url to listbox and ini file

Url = IExplorer.GetLocationURL("Plugin1");
NewName = Dialog.Input("Add Favorite - Enter a name", "Please enter the name for the website to add:", "", MB_ICONQUESTION);
if NewName ~= "CANCEL" then
NewSite = {}
NewSite.Text = NewName
if NewName == "" then
Dialog.Message("Error", "You must designate a name for your favorite, it cannot be blank.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
NewName = Dialog.Input("Add Favorite - Enter a name", "Please enter the name for the website to add:", "", MB_ICONQUESTION);
end
NewUrl = Dialog.Input("Add Favorite - Specify the address", "Please enter the url address for: "..NewName, Url, MB_ICONQUESTION);
if NewUrl ~= "CANCEL" then
NewSite = {}
NewSite.Text = NewName
NewSite.Data = NewUrl
if NewUrl == "" then
Dialog.Message("Error", "URL must be defined and cannot be blank to add favorite.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
NewUrl = Dialog.Input("Add Favorite - Specify the address", "Please enter the url address for: "..NewName, Url, MB_ICONQUESTION);
end
end
if NewSite.Text ~= "" and NewSite.Data ~= "" then
INIFile.SetValue("AutoPlay\\Docs\\Timed.ini", NewSite.Text, "Url", NewSite.Data);
FavCount = ListBox.GetCount("WEBLIST");
--FavInd = 0
if FInc == nil then
FInc = FavCount + 1
else
FInc = FInc + 1
end
ListBox.AddItem("WEBLIST", FInc, NewSite);
end
end

Leopard
02-05-2009, 02:18 AM
i have a list box with 300 rows...
is there any easy way to fill all rows of a listbox with the same text??

Leopard
02-05-2009, 01:08 PM
i have a list box with 300 rows...
is there any easy way to fill all rows of a listbox with the same text??

:huh:huh:huh

RizlaUK
02-05-2009, 01:29 PM
use a loop

for i=1, 300 do
-- add rows here
ListBox.AddRow(sObject,nRow,sText)
end

RizlaUK
02-05-2009, 01:30 PM
jack, did you get this fixed, just noticed the date, i was kinda busy that day, lol