[Mono-dev] Fwd: RichTextBox Scroll Position

Ivan N. Zlatev contact at i-nz.net
Tue Oct 21 14:02:53 EDT 2008


---------- Forwarded message ----------
From:  <alisdair_little at yahoo.com>
Date: Tue, Oct 21, 2008 at 4:28 PM
Subject: Re: RichTextBox Scroll Position
To: contact at i-nz.net


Hi Ivan,

Thanks so much for the hint. It works like a charm!

Kind Regards,

Al

Ivan N. Zlatev wrote:
>
> On Mon, Oct 20, 2008 at 5:00 PM, Alisdair Little
> <alisdair_little at yahoo.com> wrote:
>>
>> Hi Guys,
>>
>> Any idea how to get the vertical scroll position for a RichTextBox?
>>
>> I have tried;
>>        [DllImport("user32")]
>>        public static extern bool GetScrollInfo(IntPtr hwnd, int fnBar,
>> ref
>> SCROLLINFO lpsi);
>>        [DllImport("user32")]
>>        public static extern int GetScrollPos(IntPtr hwnd, int nBar);
>>        [DllImport("user32")]
>>        public static extern int SendMessage(HWND hwnd, int wMsg, int
>> wParam, IntPtr lParam);
>>
>> All these calls work under Visual Studio/windows but not under mono.
>> My Environment: Windows XP, Visual Studio 2005 and Mono 2.0.
>>
>
> What about richTextBox.GetPositionFromCharIndex
> (richTextBox.GetFirstCharIndexFromLine (0)).Y ?
>
> --
> Kind Regards,
> Ivan N. Zlatev
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
Quoted from:
http://www.nabble.com/RichTextBox-Scroll-Position-tp20073031p20092389.html




-- 
Kind Regards,
Ivan N. Zlatev


More information about the Mono-devel-list mailing list