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


    Write your reply...

    Similar threads

    MP1 MP2 Design questions. DE
    No No
    No No
    Is there an xml display utility that will allow graphically checking of dialog and osd text and graphics element placement? or Is...
    Replies
    1
    Views
    285
    Nice finding! (y)(y)(y) Adapted to new DWHD and PVHD ;) Position is in front of category bar ;)
    Nice finding! (y)(y)(y) Adapted to new DWHD and PVHD ;) Position is in front of category bar ;)
    This thread is intended for skin authors, plus those advanced users who have learnt skin programming and have customised the skins...
    Replies
    1
    Views
    908
    It is present, but not with that name. It is called Scheduler, viz: Interesting. I had never noticed that when the "command" is "ACTION", the "cmdproperty" is the actual window id, but it makes sense that it is. Try this for yourself. First backup your working profile for the remote, then in the "Mapping" panel make a change to...
    It is present, but not with that name. It is called Scheduler, viz: Interesting. I had never noticed that when the "command" is...
    I would like to be able to go directly to the Scheduled recordings window without having to first go to the home menu. I saw this...
    Replies
    1
    Views
    199
    Attached are new TV service logs with your latest DLL. I see lots of EPG events and none of the messages from earlier. Congratulations!
    Attached are new TV service logs with your latest DLL. I see lots of EPG events and none of the messages from earlier. Congratulations!
    I have some weird behavior trying to operate the MP GUI in a new installation of MP 1.36 under Windows 11 Pro. Some of the remote...
    Replies
    33
    Views
    3K
    • Sticky
    MP 1.37 Final (Willow) Bugfix II released, download links updated...
    MP 1.37 Final (Willow) Bugfix II released, download links updated...
    We have just released MediaPortal 1.37 - Willow x86 and x64 version. Highlights of this release Bugfixes: [MP1-5232] - GPU...
    Replies
    4
    Views
    684
    Top Bottom