[Gambas-user] It looks like a bug, it walks like a bug...

nospam.nospam.nospam at ...626... nospam.nospam.nospam at ...626...
Thu Nov 26 10:34:54 CET 2009


Now what on this planet would cause the behaviour shown in these three 
images and described below?

1) The fields in p1_ok are disabled in the design environment.
   The fields are as they should be.

2) The fields in p2_not_ok are enabled in code.

3) You can see the text is enabled, and it is editable in
   p2_not_ok.

4) The background colour does not revert to the default when
   the fields are enabled. The background colour stays at the
   disabled colour, yet foreground text colour is working ok.

5) I am not setting colours anywhere in my code, at all. So
   please don't suggest I look there.

6) The form is quite complex so I built a test application that
   replicates the design structure, and it works fine. Click
   Edit and the text fields go white in the test app. Click OK or
   Cancel and the fields disable and change colour, as they should.
   Click Edit again, and it's still working fine in test app.

7) If I add a line to manually change the background color in the
   main app when the Edit button is clicked, like this:

       txtRemoteServerUsername.BackColor = Color.TextBackground

   Then the background goes white. Ok, so now I know I can work around
   the issue, but I have quite a few fields to work around.

8) After setting txtRemoteServerUsername.BackColor = Color.TextBackground,
   I get the problem shown in p3_not_ok. The default disabled colour
   has changed, though that may be due to changing the enabled backcolour.

Oddly, if I use this:

txtRemoteServerUsername.BackColor = Color.Default

I get the very same problem as shown in p2_not_ok. It would seem that 
something, either gambas (2.17) or GTK has forgotten what Color.Default is.

Has anyone seen this before? 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p2_not_ok.png
Type: image/png
Size: 28296 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20091126/ad144047/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1_ok.png
Type: image/png
Size: 26837 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20091126/ad144047/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p3_not_ok.png.png
Type: image/png
Size: 27133 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20091126/ad144047/attachment-0002.png>


More information about the User mailing list