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

I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For the first example, I highlighted the example text and eventually found the location in the menus where I could select the CODE macro to have the example text formatted as a code example. So far, so good...
I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For...
I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For...
Replies
0
Views
532
Maybe the server is/was too busy when you tried to authenticate. I occasionally run into that too, also with the opensubtitles api I regularly get 429's... there isn't much that can be done about it, except making sure the software isn't hammering the service and having patience...
Maybe the server is/was too busy when you tried to authenticate. I occasionally run into that too, also with the opensubtitles api...
Hello, Hello, when I try to authorize trakt configuration for mediaportal using the trakt plugin, I get the following error...
Replies
1
Views
751
Are different people taking turns watching the same thing on the same HTPC? For me, separating users in MP2 is a drawback, as is the interface. Simply put, this can't be done in MP1, or rather, it can't be done quickly, because everything would have to be rewritten. But if each user logs in with their own Windows account, MP1 can...
Are different people taking turns watching the same thing on the same HTPC? For me, separating users in MP2 is a drawback, as is...
Hello, Is there a way to integrate a multi-user interface in MP1 where you can create different end users, similar to MP2? A...
Replies
2
Views
1K
I have added a scheduled task to MariaDB to delete all entries with the same start and end date
I have added a scheduled task to MariaDB to delete all entries with the same start and end date
Hello, I'm encountering an issue after importing EPG data into the TV-Server/Database. The Problem: After importing an XMLTV...
Replies
7
Views
2K
After many hours of troubleshooting I've given up and accepted that it's just "one of these things" when using madVR for watching live TV. I've now ticked the box to "Use EVR for LiveTV", with a default display refresh rate of 50Hz. In combination with tweaking some of the Nvidia 3D settings for the MP executable only, I now have a...
After many hours of troubleshooting I've given up and accepted that it's just "one of these things" when using madVR for watching...
Every so often, when I switch to a TV channel, my MP client stops accepting user inputs, either from the remote or keyboard/mouse...
Replies
30
Views
8K
Top Bottom