MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2004-12-27, 13:54   #1 (permalink)
Retired Team Member
 
Join Date: Sep 2004
Location: Finland
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts


Default Simple examle how to populate list control

Hello,

I'm looking for a simple example how to work with list control.
Would like to read folder and display all subfolders as a entry on a list box.

CoolHammer
__________________
AMD Sempron 2400+ / ATI AIW 9000 Pro / Samsung 120Gb / Asus A7N8X-VM/400 / Windows XP pro Fi /LG 32LP1 LCD TV connected with DVI /Sony amp connected with S/PDIF
CoolHammer is offline   Reply With Quote
Old 2004-12-28, 10:18   #2 (permalink)
Retired Team Member
 
Join Date: Sep 2004
Location: Finland
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts


Default

What is the name of control that has list of items scrollabel up / down?

Listcontrol seems to be button with left right scrolling

CoolHammer
__________________
AMD Sempron 2400+ / ATI AIW 9000 Pro / Samsung 120Gb / Asus A7N8X-VM/400 / Windows XP pro Fi /LG 32LP1 LCD TV connected with DVI /Sony amp connected with S/PDIF
CoolHammer is offline   Reply With Quote
Old 2004-12-28, 12:50   #3 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Fribourg (CH)
Posts: 314
Thanks: 0
Thanked 1 Time in 1 Post


Default

not sure if you mean the ListView control?

http://msdn.microsoft.com/library/de...classtopic.asp

(set VIEW property to DETAILS to have a row-based view).

HTH,

Daniel
__________________
waeberd is offline   Reply With Quote
Old 2004-12-28, 13:09   #4 (permalink)
Retired Team Member
 
Join Date: Sep 2004
Location: Finland
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Thanks waeberd

Well ... looks like i need to be more specific when asking questions

Im trying to make a myquiz plugin. One part of a plugin is a contol where user can select which quiz she/he will take. It is a list of "quiz names" there can be several quiz to choose from so this list can be several pages long.

So Im trying to generate control on MP gui.

CoolHammer
__________________
AMD Sempron 2400+ / ATI AIW 9000 Pro / Samsung 120Gb / Asus A7N8X-VM/400 / Windows XP pro Fi /LG 32LP1 LCD TV connected with DVI /Sony amp connected with S/PDIF
CoolHammer is offline   Reply With Quote
Old 2004-12-28, 13:32   #5 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Fribourg (CH)
Posts: 314
Thanks: 0
Thanked 1 Time in 1 Post


Default

Quote:
Originally Posted by CoolHammer
So Im trying to generate control on MP gui.
ok

in this case, I would choose a GUIListControl. This contains many GUIListItems.

I use the following code to populate this (see GUIPrograms.cs for the whole stuff).

Code:
void DisplayApplications()
{
	GUIControl.ClearControl(GetID, (int)Controls.CONTROL_LIST ); 
	foreach(AppItem app in apps ) // this loops an internal structure
	{
		GUIListItem gli = new GUIListItem( app.Title );
		if (app.Imagefile != "")
		{
			gli.ThumbnailImage = app.Imagefile;
			gli.IconImageBig = app.Imagefile;
			gli.IconImage = app.Imagefile;
		}
		else 
		{
			gli.ThumbnailImage = GUIGraphicsContext.Skin+@"\media\DefaultFolderBig.png";
			gli.IconImageBig = GUIGraphicsContext.Skin+@"\media\DefaultFolderBig.png";
			gli.IconImage = GUIGraphicsContext.Skin+@"\media\DefaultFolderNF.png";
		}
		gli.MusicTag = app; // this is for speeding-up only
		gli.IsFolder = false;
		GUIControl.AddListItemControl(GetID,(int)Controls.CONTROL_LIST, gli );
	}
}
Hope that helps!

Daniel
__________________
waeberd is offline   Reply With Quote
Old 2004-12-28, 13:53   #6 (permalink)
Retired Team Member
 
Join Date: Sep 2004
Location: Finland
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Cool ... that helped a lot

Hmm .. let see how to parse directory structure to GUIListitems ...

CoolHammer
__________________
AMD Sempron 2400+ / ATI AIW 9000 Pro / Samsung 120Gb / Asus A7N8X-VM/400 / Windows XP pro Fi /LG 32LP1 LCD TV connected with DVI /Sony amp connected with S/PDIF
CoolHammer is offline   Reply With Quote
Old 2004-12-28, 14:01   #7 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Fribourg (CH)
Posts: 314
Thanks: 0
Thanked 1 Time in 1 Post


Default

Quote:
Originally Posted by CoolHammer
Hmm .. let see how to parse directory structure to GUIListitems ...
Look for the LoadDirectory routine spread allover the WindowPlugin-source files!

enjoy!

Daniel
__________________
waeberd is offline   Reply With Quote
Reply

Bookmarks

Tags
control, examle, list, populate, simple

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MediaPortalEditor - New BETA Release Avaiable hamheed Skins 51 2007-06-24 17:58
Inifinite Loop in GUI List Control TesterBoy 0.2.0.0 Final and SVN Builds 3 2006-09-19 06:36
GUI List Control JestriK Plugins 5 2006-08-14 13:12
cant see list control list in my plugin kenny Plugins 1 2006-04-04 20:58
Finally a Fix for MPexTuneCMD with DTV Control. bitbyte Tips and Tricks 1 2005-10-16 14:24


All times are GMT +1. The time now is 05:42.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden