Simple examle how to populate list control (1 Viewer)

CoolHammer

Retired Team Member
  • Premium Supporter
  • September 28, 2004
    174
    0
    Finland
    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
     

    CoolHammer

    Retired Team Member
  • Premium Supporter
  • September 28, 2004
    174
    0
    Finland
    What is the name of control that has list of items scrollabel up / down?

    Listcontrol seems to be button with left right scrolling

    CoolHammer
     

    CoolHammer

    Retired Team Member
  • Premium Supporter
  • September 28, 2004
    174
    0
    Finland
    Thanks waeberd :)

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

    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
     

    waeberd

    Portal Pro
    August 16, 2004
    314
    1
    Fribourg (CH)
    CoolHammer said:
    So Im trying to generate control on MP gui.

    ok :D

    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
     

    Users who are viewing this thread

    Similar threads

    Database Scrapers don't index my TV Series single files in the following containers MP4, MOV, AVI, ASF, WMV, MKV, FLV, TS, MTS, M2TS, DAT, MPG, MPEG, DIV, DIVX, VOB, ISO, TRP I use the following simple format for container ISO (ISO's are full copies of DVD with all warnings, info, even encription intact) TV Series Name 00x00-00...
    Database Scrapers don't index my TV Series single files in the following containers MP4, MOV, AVI, ASF, WMV, MKV, FLV, TS, MTS...
    My Tv Series are in the Format. TV Series Name 00x00 Episode Name The First 00 is the Series Number The Second 00 is the Episode...
    Replies
    1
    Views
    295
    Can anyone help with this?
    Can anyone help with this?
    Hi, How do I create a music view in the MP1 configuration tool music views section to list all my song tracks under a heading of...
    Replies
    1
    Views
    383
    in MP config goto plugins -> MovingPictures and open the config. There you can delete the wanted movies ;)
    in MP config goto plugins -> MovingPictures and open the config. There you can delete the wanted movies ;)
    I am using MediaPortal 1.30 and Moving Pictures. In fact, I have been using them for so long that my movie list is now... a mess...
    Replies
    1
    Views
    294
    I just came across WiFi Remote in a roundabout way. I am looking for a way to remotely control my HTPC, which is located in my home theatre room with a beamer and has Media Portal installed, from the living room, where there is a TV that is connected to the HTPC. Unfortunately, I don't know how to do this remote control once the...
    I just came across WiFi Remote in a roundabout way. I am looking for a way to remotely control my HTPC, which is located in my home...
    I just came across WiFi Remote in a roundabout way. I am looking for a way to remotely control my HTPC, which is located in my home...
    Replies
    0
    Views
    491
    Of course this would be the best option, but I guess it’s not that easy to integrate external players into MP2. It was somewhere discussed, but I could not find the related thread.
    Of course this would be the best option, but I guess it’s not that easy to integrate external players into MP2. It was somewhere...
    Hi there, I have a few questions about the limitations I've discovered (so far, it's early days!) when it comes to watching a tv...
    Replies
    9
    Views
    639
    Top Bottom