| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > Delphi: Общие вопросы > label help please |
| Автор: muratboy31 25.2.2010, 12:28 | ||||
i am trying to change label caption from xml file, i have several names in xml file and i want to show them in label caption 1 by 1 randomly...
and the xml file is like that;
|
| Автор: Frees 25.2.2010, 14:40 | ||||
| а xml создаете сами? структура у него не корректная. зачем item1 ... item3 можно просто item,
но если настаиваете на вашем варианте то
|
| Автор: muratboy31 25.2.2010, 14:58 | ||
| yes i will create the xml file with every students private blog page... example: <?xml version="1.0" encoding="ISO-8859-1"?> <School> <item1> <Caption>Jack</Caption> <Link>www.blogger.com/Jack</Link> </item1> <item2> <Caption>Leonard</Caption> <Link>www.blogger.com/Leonard</Link> </item2> <item3> <Caption>Suzan</Caption> <Link>www.blogger.com/Suzan</Link> </item3> </School> thats why i choosed item with numbers (item1, item2, item3....) i used the code but it doesnt show anything in label object... is it because i use XMLdoc.LoadFromFile('Names.xml'); with timer
|
| Автор: Frees 25.2.2010, 14:59 |
| поправил код в посте выше |
| Автор: muratboy31 25.2.2010, 15:08 |
| am i doing something wrong or it doesnt change the label text ... i attached the project file, can you please have a look ... thanks |
| Автор: Frees 25.2.2010, 15:19 | ||
так? |
| Автор: muratboy31 25.2.2010, 15:29 |
| small question is it normal that name doesnt change in the label, it always show Leonard item2 caption, never change... |
| Автор: muratboy31 25.2.2010, 15:37 |
| thanks |
| Автор: muratboy31 25.2.2010, 16:02 |
i am sorry again, what is that error mean ?![]() |
| Автор: Frees 25.2.2010, 20:04 |
не найден item с искомым номером в файле |
| Автор: muratboy31 25.2.2010, 20:37 | ||||
yes but i have xml items with numbers like that ;
and this is the code i use;
i still get the error... |
| Автор: Frees 25.2.2010, 21:01 | ||
возможно
|
| Автор: muratboy31 25.2.2010, 21:54 |
| thanks Frees it works but it only random only between item1 and item2... no other items |
| Автор: Frees 25.2.2010, 22:34 |
| еслия я вас правельно андестент то наверно надо i := Random(Count ) + 1; |
| Автор: muratboy31 25.2.2010, 22:41 |
| thanks frees do u not think it is better to download the xml file on form create and load the item with timer ??? |
| Автор: muratboy31 26.2.2010, 10:19 |
| problem is in the threat below... |
| Автор: muratboy31 26.2.2010, 15:23 | ||
why this doesnt work ?
|