NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 39 40 41 42 43 … 93 Next »
UiSimpleList - ImageList?, IconView?

 
  • 0 Vote(s) - 0 Average
UiSimpleList - ImageList?, IconView?
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#1
2007-10-08, 05:54 AM
Sub, can a UiSimpleList display a panel of images like the uiList of a baseButtonUiList? (UiList.ViewMode.MODE_ICON)

Or if I did have some dynamic images (in memory, or urls) can I assign them into a list.

There used to be the <DrawImage @filename> tag. but that took filenames did it not?
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#2
2007-10-08, 05:59 AM
Wonder if we could make the wImage @filename> tag take a url instead of a filename and display that?

I imagine you must do something similar with YouTube...
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#3
2007-10-08, 04:20 PM
psycik Wrote:Sub, can a UiSimpleList display a panel of images like the uiList of a baseButtonUiList? (UiList.ViewMode.MODE_ICON)
The UiSimpleList only has single view mode (MODE_LIST). It can display images in that list though.

Quote:Or if I did have some dynamic images (in memory, or urls) can I assign them into a list.

There used to be the <DrawImage @filename> tag. but that took filenames did it not?
Yes, you can do this. Use <DrawImage @filename> where @filename is actually an Image object.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#4
2007-10-08, 04:20 PM
psycik Wrote:Wonder if we could make the wImage @filename> tag take a url instead of a filename and display that?

I imagine you must do something similar with YouTube...
In the YouTube plugin I use the mechanism described above, ie passing in an Image object.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2007-10-09, 09:45 PM
Does this work with UiList or only UiSimpleList? I've attempted:
item.AddProperty("@thumbnail", "<img src=http://someserver.com/file.jpg>"); and
item.AddProperty("@thumbnail", "http://someserver.com/file.jpg");

along with:
<DrawImage @thumbnail loc="3,55" size="95,50"/> and
<DrawImage filename="@thumbnail" loc="3,55" size="95,50"/>

In all possible combinations and I can't get it to work.

Sorry for being dense but I'm stumped.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#6
2007-10-09, 11:56 PM
No, if it's supplied via a property then it expects it to be an Image object (or a call back interface for you to dynamically load the image). ie, you could do something like:
item.AddProperty("@thumbnail", Image.FromFile("http://someserver.com/file.jpg"));

<DrawImage filename="@thumbnail" loc="3,55" size="95,50"/>
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#7
2007-10-10, 01:02 AM
Thanks sub. Image.FromFile() would not take a url but I noticed there was also Image.FromStream() which works for me:
Code:
System.IO.Stream img = new System.Net.WebClient().OpenRead("http://someserver.com/file.jpg");
item.AddProperty("@thumbnail", Image.FromStream(img));
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#8
2007-10-10, 02:14 AM
whurlston Wrote:Thanks sub. Image.FromFile() would not take a url but I noticed there was also Image.FromStream() which works for me:
Code:
System.IO.Stream img = new System.Net.WebClient().OpenRead("http://someserver.com/file.jpg");
item.AddProperty("@thumbnail", Image.FromStream(img));

Cool, cos that's what i would have actually been after...rather than downloading all the images to disk...
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#9
2007-10-10, 08:04 AM
Did you get this working whurlston? I'm trying now (just made sure the images worked by saving them).

But getting a null reference when the render is called. Can't figure out what it is that is null....
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#10
2007-10-10, 08:22 AM
It worked for me. Image was rendered funny because of my skin.xml settings but that's a different issue (of my own making).

I used UiList though, not UiSimpleList. I have not tried it with that.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  UiList vs UiSimpleList mvallevand 1 1,353 2010-01-02, 04:38 AM
Last Post: sub
  Loading Large lists - uiSimpleList, UiList psycik 10 3,359 2008-07-14, 10:08 PM
Last Post: psycik
  UiSimpleList - Ctrl-Right/Ctrl-Left psycik 6 2,021 2008-02-27, 08:11 PM
Last Post: sub
  VB.NET UiSimpleList.CommandCallBack BekKen 2 1,685 2007-09-04, 02:51 PM
Last Post: BekKen
  Problem expanding iconview's row/columns Juriko 4 1,695 2006-11-16, 07:36 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode