Nevron Forum

Control updating / painting issues?

https://www.nevron.com/Forum/Topic4940.aspx

By lars knox - Wednesday, February 23, 2011

Hi,

I am using the Nevron Rich Text Box (NRichTextBox) with the following properties set: ScrollBars=ForcedVertical, ReadOnly=True and I am having severe issues with the scroll bar.

When the form comes up, the scrollbars on the rich text box look ok. When the user grabs the 'thumb' of the scrollbar and slides it down however, the 'thumb' does not move until the user releases it (although the text does scroll down). Also, when the user releases the thumb it reverts to a Windows scroll bar (it looses it's palette?) until the cursor leaves the thumb area, then it looks normal again.

On the same form I have two Nevron buttons (NButtons) that are not painted when the form first appears. However, once I hover over the button with the mouse, it paints normally.

I am not using SuspendLayout or ResumeLayout, rather I just plopped all the controls on a very simple form and they don't work as expected. This is a very straightforward, no frill form and I am perplexed by the behavior of these two common controls.

Any suggestions?

 

By lars knox - Thursday, February 24, 2011

At this point I suspect I might need to implement a custom class that inherits from NScrollBarElementRenderer... I am looking for a coding example right now. I've googled the term 'NScrollBarElementRenderer' and searched the Nevron knowledge base as well as Nevron online documentation and the example solution that comes with the software - but so far I cannot find any coding examples. Am I heading in the right direction?
By lars knox - Thursday, March 3, 2011

Hi guys,

It's been a while since I posted this question. I have not been able to come up with a solution to what appears to be a faulty scroll bar on a NRichTextBox.

Do you have any suggestions on how to get the thumb to paint correctly? Thank you.
By Nevron Support - Monday, March 7, 2011

Hello Lars,

We haven't found any solution of this problem yet.
We use windows API function GetScrollInfo that belongs to User32.dll to track the position of the scrollbar's thumb.
This function behaves differently when used with TextBox and RichTextBox (NTextBox and NRichTextBox derives from them).
We use this function identically in both control, but strangely the position of the scrollbar thumb in NRichTextBox updates when the mouse is released and in NTextBox when the value is actually changed.
As soon as we have any solution we will let you know.
We apologize for the inconvenience.
By lars knox - Wednesday, March 9, 2011

Thanks for your response on this. Please let me know if or when you have a solution. My project sponsor really likes the look and feel of the Nevron suite of controls and I'd like to stay with a single set of 3rd party controls if at all possible.

Lars