dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bugs #11553] TextBox doesn't correctly handle scrollb


From: anonymous
Subject: [Pnet-developers] [bugs #11553] TextBox doesn't correctly handle scrollbars
Date: Mon, 10 Jan 2005 12:21:31 +0000
User-agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)

This is an automated notification sent by Savannah.
It relates to:
                bugs #11553, project DotGNU Portable.NET

==============================================================================
 OVERVIEW of bugs #11553:
==============================================================================

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11553>

                 Summary: TextBox doesn't correctly handle scrollbars
                 Project: DotGNU Portable.NET
            Submitted by: None
            Submitted on: Mon 01/10/2005 at 07:21
                Category: None
                Severity: 5 - Average
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________


Conditions:

- TextBox.Multiline = true

- TextBox.ScrollBars = ScrollBars.Vertical (force the vertical scrollbar to
be visible)

- TextBox must be the child of a Form (or maybe Control ?) that isn't
visible



If these conditions are met and you assign a new text to the textbox and then
show the dialog it can happen that some text disappears under the scrollbar
instead of getting wrapped. The attached test application shows this bug.



The problem is that in TextBox.cs the visibility of scrollbars is set
directly with the ScrollBar.Visible property. But this property returns false
if its parent's Visible returns false. If the textbox is a child of a Form
that isn't visible yet then the ScrollBar.Visible property returns false
although it was set to true earlier.



This screws the layout calculations, they are calculated as if the scrollbar
was not visible. When the textbox finally gets visible there is no
relayouting done.



There are two solutions that I can see so far:



The easy one is to add an OnVisibleChanged handler that relayouts the text
when the textbox gets visible. Layouting is done twice here.



The better one which I'll implement and provide a patch for is to have two
internal bools which save whether the vertical and horizontal scrollbar will
be visible, all calculations then use these bools and not ScrollBar.Visible.





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 01/10/2005 at 07:21  Name: TextBoxTest.zip  Size: 28.94KB   By:
None
Test application that demonstrates this bug
<http://savannah.gnu.org/bugs/download.php?item_id=11553&item_file_id=2050>

==============================================================================

This item URL is:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11553>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]