Hi,
How can I use two different Listbox in the same project and each listbox
has its own pages?
Any examples?
Hope it's clear.
Thank you.
Professional Software Development Tools
Hi,
How can I use two different Listbox in the same project and each listbox
has its own pages?
Any examples?
Hope it's clear.
Thank you.
What do you mean by "has its own page"s?
No problems to have two LBs, each one behaving separately.
Please explain
Yossi
As long as the LBs have different names, which AMS will force, you can do as many LBs as you want. One LB calls on this and one on that. No different really then using one big one. I know that's not what you're looking for but I used it as an example. If possible try loading the information used to process in the Data slot. If say you use the same reg address except for the Value, just put the value in the data, and a Variable in the Value part of the address to accept what ever is passed ot it.Originally Posted by Brave Heart
Hope I made some sense. Some guys here are better at describing things then me.
Thanks for replying.
Could you plz have a look to the atached file? It may make my idea clearer.
http://www.sendspace.com/file/opbqn6
The problem is that whenever I add a new page to one of the LBs it also
appears in the other one.
Now, I want to add several pages to (Stories List) and others to (Movies List)
but I don't want them to get mixed.
Thanks a lot.
your ZIP file is broke. winzip doesnt recognize it.
chris
Here is the file again. It's copressed with winrar.
http://www.sendspace.com/file/sbejj9
Thanks
your problem is... you only have 3 pages. Main....Movies.....Stories
you have this code (this is copied from the Movies page.
it looks like you want a seperate page for each movie/stories.Code:-- get the pages tbl_Pages = Application.GetPages(); if tbl_Pages then -- clear the listbox for num_Item = 1, ListBox.GetCount("ListBox2") do ListBox.DeleteItem("ListBox2", 1); end for num_Index, str_PageName in tbl_Pages do ListBox.AddItem("ListBox2", str_PageName, ""); end end
well you need to create the pages for those movies/stories, one per page.
name the pages movie1, movie2, movie3, .... same for the stories.
then you can use this script.
it will step through the table and only put the pages that have the word MOVIE in its title into your listbox.Code:-- get the pages tbl_Pages = Application.GetPages(); if tbl_Pages then -- clear the listbox for num_Item = 1, ListBox.GetCount("ListBox2") do ListBox.DeleteItem("ListBox2", 1); end for num_Index, str_PageName in tbl_Pages do nMovie = String.Find(str_PageName, "movie", 1, false) if nMovie ~= -1 then ListBox.AddItem("ListBox2", str_PageName, ""); end end end
change the text in red to stor and it will do the same for that listbox too.
now, the way i would go about doing this is, put the movies you want in your project into one folder (AutoPlay\ Videos)
the same for the stories (AutoPlay\Stories)
then you would only need one page (you also only need one page with the way you're working it right now) with 2 listbox's
Use this script to fill both listbox's with the contents of the folders.
Code:----On your Page-Show ListBox.DeleteItem("ListBox1", -1); ListBox.DeleteItem("ListBox2", -1); tVids = File.Find("AutoPlay\\Videos", "*.*", false, false, "", "") count = 1 for y,z in tVids do ListBox.AddItem("ListBox1", "Movie"..count, z) count = count +1 endHTHCode:--On Your Listbox's tSelected = ListBox.GetSelected("ListBox1") GO = ListBox.GetItemData("ListBox1", tSelected[1]) Dialog.Message(tSelected[1], GO, MB_OK, MB_ICONNONE, MB_DEFBUTTON1
Chris
Thank you very much.
I found some difficulties to aplly the codes you already posted.
Could you plz help me with an example.
Thanks
Brave Heart and other interested newbies
Here is a simple little learning example that will display almost all of the media supported in AMS 6. It only uses 2 pages to do so. A Menu and Media Viewer page.
There are several listboxes on the menu page to "drill" down to the media type. These are populated from the files in folders under the project AutoPlay directory (Docs, Audio, etc.) I included a sample of each media type except video missing to keep the .apz size down).
All info labels are set by media selected.
It has the Media Player plugin (for video and music.), Web (which can support several text formats, html, text, .doc, .rtf, even PDF if the system has Adobe reader installed, etc), Image, and Flash all on one page. The viewer type is set by a variable when the media type is selected prior to the page jump.
Just put your media files in the folders shown in the script. It is simple, so there's room for lots of custom tweaks.
Last edited by Roboblue; 07-29-2006 at 08:15 PM.
Thank you Robo.
But what I really need is what stickck suggested in reply 7. I need an example
to apply the codes he posted.
Thanks
Sorry. i only have Version 5 at work. it should convert just fine to Version 6.
Chris