home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Talk
Guicontrolsdemo ? come out, come out, whereever you are?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mm1352000" data-source="post: 1201515" data-attributes="member: 82144"><p>My advice: pick one window/class - ideally one that uses a list such as GUIMusicFiles - and simply notice:</p><ol> <li data-xf-list-type="ol">Which GUIWindow functions are overriden.</li> <li data-xf-list-type="ol">Which actions and messages are handled.</li> </ol><p>It shouldn't take more than 10 minutes to do that. The other detail is fluff that you don't need to care about. Don't try to understand everything; you'll get overwhelmed, and like I say, you don't need to understand it (because it's context-specific stuff).</p><p></p><p></p><p>Good. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p>Nah, MP is simpler than both: high level like WinForms, but far less components/controls... and the components/controls are also far simpler (less properties and events/messages/actions). I can't think of any similarities to a 3705 environment.</p><p></p><p></p><p>As per my previous reply: override the GUIWindow OnClicked() method if that's what you want to be notified about.</p><p></p><p></p><p>As above: look for the overrides. There are OnClicked() handlers in many of those windows including GUIMusicFiles:</p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/WindowPlugins/GUIMusic/GUIMusicFiles.cs#L876" target="_blank">https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/WindowPlugins/GUIMusic/GUIMusicFiles.cs#L876</a></p><p></p><p></p><p>Can we please agree on terminology. It's going to make it much easier for us to understand each other. In this particular context (other contexts may vary), what you're calling "moving down the list" is called "selection" in MP parlance, and what you're calling "selecting" is called "clicking".</p><p>You figured out how to be notified about selection (moving down the list): via the GUIListItem OnItemSelected event.</p><p>I've told you how to be notified about clicking (selecting): via the GUIWindow OnClicked() method.</p><p>This should be done and dusted now, so lets move on.</p><p></p><p></p><p>Yes and no.</p><p></p><p>From the description of your interface, you have a button and a list. Therefore you'll have GUIButtonControl and GUIListControl controls within a GUIWindow... in exactly the same way as you'd have a Button and a ListView component within a Form if this were WinForms. MP controls also have properties (eg. labels) like WinForms components. You shouldn't have any trouble understanding that as it's very similar and intuitive.</p><p></p><p>As is explained in the wiki and GUIWindow code comments, notifications from controls (ie. in your case the button and list) are generally passed through the parent window's OnAction() or OnMessage() methods. The OnItemSelected event you found is an exception. This is different from a WinForms mentality where each component has a ton of events. In that sense, yes you need to focus on on GUIWindow to know about OnAction(), OnMessage(), OnClicked() etc... but it's still the controls that are sending actions, messages and events through those methods, and the controls still have their properties (labels, tags etc.), so you shouldn't ignore them. A balanced approach is appropriate.</p><p></p><p></p><p>The above is as good as you're going to get from me. General exploration of "the long and hard way" is great - to be encouraged if you're interested and enjoy learning! Unfortunately I just don't have the time to travel that way with you. I can only commit to attempting to answer specific questions. That's the only way I can keep to a sane level of commitment to this project. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p></p><p></p><p>You're welcome. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="mm1352000, post: 1201515, member: 82144"] My advice: pick one window/class - ideally one that uses a list such as GUIMusicFiles - and simply notice: [LIST=1] [*]Which GUIWindow functions are overriden. [*]Which actions and messages are handled. [/LIST] It shouldn't take more than 10 minutes to do that. The other detail is fluff that you don't need to care about. Don't try to understand everything; you'll get overwhelmed, and like I say, you don't need to understand it (because it's context-specific stuff). Good. :) Nah, MP is simpler than both: high level like WinForms, but far less components/controls... and the components/controls are also far simpler (less properties and events/messages/actions). I can't think of any similarities to a 3705 environment. As per my previous reply: override the GUIWindow OnClicked() method if that's what you want to be notified about. As above: look for the overrides. There are OnClicked() handlers in many of those windows including GUIMusicFiles: [URL]https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/WindowPlugins/GUIMusic/GUIMusicFiles.cs#L876[/URL] Can we please agree on terminology. It's going to make it much easier for us to understand each other. In this particular context (other contexts may vary), what you're calling "moving down the list" is called "selection" in MP parlance, and what you're calling "selecting" is called "clicking". You figured out how to be notified about selection (moving down the list): via the GUIListItem OnItemSelected event. I've told you how to be notified about clicking (selecting): via the GUIWindow OnClicked() method. This should be done and dusted now, so lets move on. Yes and no. From the description of your interface, you have a button and a list. Therefore you'll have GUIButtonControl and GUIListControl controls within a GUIWindow... in exactly the same way as you'd have a Button and a ListView component within a Form if this were WinForms. MP controls also have properties (eg. labels) like WinForms components. You shouldn't have any trouble understanding that as it's very similar and intuitive. As is explained in the wiki and GUIWindow code comments, notifications from controls (ie. in your case the button and list) are generally passed through the parent window's OnAction() or OnMessage() methods. The OnItemSelected event you found is an exception. This is different from a WinForms mentality where each component has a ton of events. In that sense, yes you need to focus on on GUIWindow to know about OnAction(), OnMessage(), OnClicked() etc... but it's still the controls that are sending actions, messages and events through those methods, and the controls still have their properties (labels, tags etc.), so you shouldn't ignore them. A balanced approach is appropriate. The above is as good as you're going to get from me. General exploration of "the long and hard way" is great - to be encouraged if you're interested and enjoy learning! Unfortunately I just don't have the time to travel that way with you. I can only commit to attempting to answer specific questions. That's the only way I can keep to a sane level of commitment to this project. ;) You're welcome. :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
Guicontrolsdemo ? come out, come out, whereever you are?
Contact us
RSS
Top
Bottom