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

Got a reply from SD ... "Looks like your last successful download was on 5/23. On 5/24 for some reason we received 194 connections between 10:54 and 11:05 triggering a denial of service attack ban. The logs show it was lifted on 5/25, but I still see the entry in iptables. I reset fail2ban and hopefully you're working again." Weird...
Got a reply from SD ... "Looks like your last successful download was on 5/23. On 5/24 for some reason we received 194...
I'm using MediaPortal 1.38.1 x64 and have an SD-DD lineup account. In the last week, I have not been able to update my EPG, and...
Replies
3
Views
466
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
862
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
950
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
2K
Thankyou High_Five, that worked perfectly, I now remember doing that 10 years ago, thanks for jogging my old memory. Cheers Tony
Thankyou High_Five, that worked perfectly, I now remember doing that 10 years ago, thanks for jogging my old memory. Cheers Tony
Hi everyone, I have been using it For 16 years now (from V1.1.1) and it has worked flawlessly. I only use TV Series and Moving...
Replies
2
Views
381
Top Bottom