Welcome, Guest
Please Login or Register.    Lost Password?

Making lists with individual pictures?
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Making lists with individual pictures?
#21309
Making lists with individual pictures? 1 Month, 2 Weeks ago  
Scrollbars are great.
Lists such as in the RSS feed or the tasks/events manager are great.
You can set the text, even have it display buttons underneath, but the button picture is always the same. Is there a way to set a different picture for each button?

Or what if I generated a text list and then wanted to change the value of the text on one of the items? How do I find the items id? (I've read that some lists generate the same id for all items, so then how do I find the table where these are stored and manipulate that?)

On a related note, I know you can use SetItemValue to change nodes in an xml string, but is there a command to inset a whole item? Something that would insert <image id="Foo" element="bar" origin=...> somewhere into the xml?

Or if I io.opened the xml file, wrote the text and io.closed it, is there a way to refresh my xml only, but not the other xmls or the scripts?(Trying to avoid a loop this way.)

Edit: You know how you load or unload xml scripts from the options dialog? Can you control that using script? Like if I have 2 xmls, one for intitialization and one to get loaded after its copied over, 1. could I make that invisible to the user so it doesn't get autoloaded using the simple skin load option, and 2. can I force load it with a script command?

Any ideas or links to tutorials would be appreciated. I lack the programming language vocabulary to do specific google searches. Thanks
SereneSavage
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Female Location: Canada
Last Edit: 2014/07/01 21:27 By SereneSavage.
The administrator has disabled public write access.
 
#21317
Re: Making lists with individual pictures? 1 Month, 2 Weeks ago  
The xml files are parsed only during refresh/restart so it's not possible to manipulate them directly during runtime. The only way to do that would be to create/edit the file and then do a full refresh but that will reload all the scripts as well.

The generic list will add a counter to the items so you can access e.g. the text like this: "list.1.text". I don't think it's possible to change the images in such list this way though. If you know how many items the list is going to contain you could try to start with <scrollgroup> and add the empty items to it. You can then name them and change the properties more easily.
Rainy
Moderator
Posts: 5935
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21321
Re: Making lists with individual pictures? 1 Month, 2 Weeks ago  
Starting with the scrollgroup is the first thing I tried, but the problem is that I have no way of knowing how many items I will have until my scripts searches the directory tree. This is why I was looking at lists.

I'm trying to guess how the list function works but I cannot find the code. I have an idea of how complicated it will be, but I'm learning more every day and maybe if i read it enough times I'll understand how it works? Can you point me to the code file?

If a list is just a table, I don't need any help creating metatables, I can do that in lua myself. I just need to know the format (what needs to be parent, what needs to be child) and then how to draw(?) it, or make the xml draw it.

(I learned the word "parse" today. This will help future google searches, so thanks Rainy.)
SereneSavage
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Female Location: Canada
The administrator has disabled public write access.
 
#21329
Re: Making lists with individual pictures? 1 Month, 1 Week ago  
If you want to learn how list work ?
You can to look the attached file, it include two skins :
Notes -- try to create a simple notebook
WindowsList -- show all active windows' name

They all are myself own creation, when I try to learn how list work.

File Attachment:
File Name: Listwork.zip
File Size: 24569
anoob
Platinum Boarder
Posts: 498
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
#21345
Re:Making lists with individual pictures? 1 Month, 1 Week ago  
Anoob thank you SO MUCH for that zip. You're a rock star.
It showed me how to do so many things I was already wondering how to set up and I understand lists now. While I was looking for details on these I found "copygroup" which solves my original question. I can never thank you enough.

I was doing forum searches here but I didn't realize the default was to return posts that were only up to a year old. It was the 3-5 year old posts that really helped me the most, and I found those by accident.

So now I'm experimenting with using a copygroup list wrapped inside a scroll list with an event handler to reset in case of redraws. I think copygroup is the greatest thing in the world because it gives each list item an id number so I can manipulate the element after. The *only* thing I wish it did was to attach position numbers to the element name as well as the id name. (Like if the user had element="name.#ECOUNT#" then the position number would get attatched - eg. "name.2.4"). But it's only a suggestion for future versions, I can work around the way it is now.

I'm learning so much about lua and programming so fast that it's scary, even to me.


On a totally unrelated question (so I don't start a new thread), the Rainlendar_Message command produces a popup box with yes/no/ok buttons. If I wanted to pop up the window where a user can select a folder (like you have in the variables section, if type=folder, the folder the user selects is used as the variable), can I do that through script? What would be the message number and what would the return be, a number or string?

At this point I can probably design my own dropdown box using lfs commands but I thought I'd ask just in case, since Rainlendar already does that I'd only be duplicating the work.


I'm amazed a cute little calendar program is slowly turning me into a programmer. Rainy you've done an awesome job building this software. It's a beast with huge teeth. You are a God, and I bow before you.
SereneSavage
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Female Location: Canada
The administrator has disabled public write access.
 
#21353
Re:Making lists with individual pictures? 1 Month ago  
So now I'm experimenting with using a copygroup list wrapped inside a scroll list with an event handler to reset in case of redraws. I am interesting for what you are doing -- use copygroup ? Can post your skin at here ? or mail it to me ?

On a totally unrelated question (so I don't start a new thread), the Rainlendar_Message command produces a popup box with yes o/ok buttons. If I wanted to pop up the window where a user can select a folder (like you have in the variables section, if type=folder, the folder the user selects is used as the variable), can I do that through script? What would be the message number and what would the return be, a number or string?

At this point I can probably design my own dropdown box using lfs commands but I thought I'd ask just in case, since Rainlendar already does that I'd only be duplicating the work.
I thinks, Rainlendar_Message can not do it, and Rainlendar also has not offer any API to do it, so you should (must) use lfs command to design it.
anoob
Platinum Boarder
Posts: 498
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
Go to topPage: 12
get the latest posts directly to your desktop