TextBox Spin (1 Viewer)

Michael.K

Portal Member
February 14, 2012
25
0
Home Country
Ukraine Ukraine
Hello, can i scroll spin always to last position? I developing chat, and text must scrolling to end but i can find property in TextControl which do this.
 

Michael.K

Portal Member
February 14, 2012
25
0
Home Country
Ukraine Ukraine
in class GUITextControl i find method OnPageDown(). In this method we get count of pages from arrayList. But ArrayList and GUISpinControl is protected and i can't work with its value. May be i сan inherited by GUITextControl and use self class with new methods each scroll text to lastPage? if it is can you send me how do it?
 

Michael.K

Portal Member
February 14, 2012
25
0
Home Country
Ukraine Ukraine
I resolve my problem with reflaction.
Code:
  var _itemList = typeof(GUITextControl).GetField("_itemList", BindingFlags.NonPublic | BindingFlags.Instance);
            ArrayList res = (ArrayList)_itemList.GetValue(chatControl);
 
            var _itemsPerPage = typeof(GUITextControl).GetField("_itemsPerPage", BindingFlags.NonPublic | BindingFlags.Instance);
            Int32 _itemsPerPageValue = (Int32)_itemsPerPage.GetValue(chatControl);
 
            int iPages = res.Count / _itemsPerPageValue;
            if (res.Count % _itemsPerPageValue != 0)
                iPages++;
            if (iPages > 1)
            {
                var _upDownControl = typeof(GUITextControl).GetField("_upDownControl", BindingFlags.NonPublic | BindingFlags.Instance);
                GUISpinControl val = (GUISpinControl)_upDownControl.GetValue(chatControl);
                int _upDownControlValue = val.Value;
 
                val.Value = iPages - 1;
                var onPageDown = typeof(GUITextControl).GetMethod("OnPageDown", BindingFlags.NonPublic | BindingFlags.Instance);
                onPageDown.Invoke(chatControl, null);
            }
may be its help some else.
 

Users who are viewing this thread

Similar threads

My knowledge of programming is limited, but the logic in this seems to confirm what I thought, thank you.
My knowledge of programming is limited, but the logic in this seems to confirm what I thought, thank you.
Good evening, Does anybody know the mouse position (Ypos coordinate) below which the topbar activates. I seem to remember there...
Replies
5
Views
628
MP1 MP2 [solved] EPG windows DE
So, with your tips I've deep looking on the config program. And I've found the mapping for HID device. I've make the key config for up and down keys. And it's Work! Really big thanks to you and the team that give this great mediacenter. Cheers ;)
So, with your tips I've deep looking on the config program. And I've found the mapping for HID device. I've make the key config for...
Hello, How to scroll the line in the epg windows with titan extended skin? I see the firts 11 channel lines but I cannot get the...
Replies
3
Views
924
The only changes I see are: Updated Marcel Groothuis version of the plugin to now support Media Portal 2.5 I can't say anything about the functionality of this plugin, I don't use TV Part, but if there are any changes that can be simply transferred, then I can try. But I can't give any guarantees.
The only changes I see are: Updated Marcel Groothuis version of the plugin to now support Media Portal 2.5 I can't say anything...
I am a long-time user of MediaPortal to watch TV. I use the Media Portal TV Server as a backend, and Kodi (previously known as...
Replies
15
Views
957
Thank's, I had already disabled the option in MP. Anyway, last night, after several tests, I suddenly hooked up the correct frequency. Honestly I've done dozens of tests and so I don't know what is the thing that unlocked the problem, but now it works.
Thank's, I had already disabled the option in MP. Anyway, last night, after several tests, I suddenly hooked up the correct...
Hello, with Mediaporta and madVR I can't get the right refresh rate of the videos to work. I've set everything needed for the...
Replies
2
Views
432
Look for all GUI Exif properties: MediaPortal-1/mediaportal/Core/Util/ExifExtensions.cs at 58c955866fb54a8c293afe525862bbb50c8f7b28 · MediaPortal/MediaPortal-1 And: https://forum.team-mediaportal.com/threads/4986-add-to-mypictures-plugin-ability-to-search-view-by-keyword.133895/post-1273275
Look for all GUI Exif properties: MediaPortal-1/mediaportal/Core/Util/ExifExtensions.cs at 58c955866fb54a8c293afe525862bbb50c8f7b28...
I would like one of the above IPTC metadata fields to display when viewing pictures in MP. I don't really care which, as I can...
Replies
1
Views
517
Top Bottom