PDA

View Full Version : Basic listbox problem


akkerfeld
04-27-2004, 04:56 PM
Hi!
I have a very basic problem with listbox.
I need to create project with a bunch of .pdf files.
I think that listbox would be the best solution to my problem.
But whenever I create a new listbox it doesn't work for me.
I say insert>listbox
I put the descritpion in item text and than with right click I insert the pdf file as file referebce. According to my thinking when I publish the project after clicking the text the pdf file should open. But nothing matters.
I tried action file open, but all it does is it opens the same pdf for all items in the listbox.
What am I doing wrong?
thx

Bruce
04-27-2004, 08:42 PM
This is assuming you have reader on the CD and the PopupMenue plug-in.
Just an idea...



tblPos = Label.GetPos("Label1");
tblSize =Label.GetSize("Label1");

x = tblPos.X;
y = tblPos.Y + tblSize.Height;

tblMenu =
{
{text="my.pdf",type=0,checked=false,enabled=true},
{text="myother.pdf",type=0,checked=false,enabled=true},

};

strSelected = PopupMenu.Show(tblMenu,x,y,PopupMenu.HALIGN_LEFT,P opupMenu.VALIGN_TOP);

if (strSelected ~= "CANCELLED") then
path_short = File.GetShortName(_SourceFolder);
--File.Run("Acrobat 6.1\\Reader\\AcroRd32.exe", "AutoPlay\\Docs\\(strSelected)", "", SW_SHOWNORMAL, false);
File.Run("Acrobat 6.1\\Reader\\AcroRd32.exe", "AutoPlay\\Docs\\".. strSelected, "", SW_SHOWNORMAL, false);
end