PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Marty Francom on March 02, 2006, 09:36:44 PM

Title: Strange Text Box problem
Post by: Marty Francom on March 02, 2006, 09:36:44 PM
Strangle problem with Text box editing.  
Problem:
  When back spacing or pressing delete key current characters in the
field are NOT cleared on the screen but if you tab out of the field or click on the field the expected contents are then painted.  This also happens
when over typing the existing characters.  The typed character types on top of the current character and makes an unreadable mess. But again if
you tab out of the field the expected characters are painted properly.

  This problem is only happening on three simular computers they are all IBM NetVista Computers running WIN-XP-pro.

  This problem does NOT occur in any other programs other than FireFly programs.   Also,  the previous release of Fire Fly does not have this behavior, and works as expected.

  Is there any way to force a text field to re-paint after every key stroke?
Title: Strange Text Box problem
Post by: TechSupport on March 02, 2006, 09:54:08 PM
This problem has been reported by David Warner as well. I am investigating why it occurs. Looks like it is related to WinXP with Themes enabled. It does not occur on my laptop but it does occur on my friends WinXP laptop. Weird.

My display an ATI Rage Mobility. The problem display is a Mobile Intel 915GM. What is the diaply adaptor on your NetVistas?????

Hey, the problem may not be related to the display adaptor at all.... It could be something with the Theme settings. If the Themes are disabled then the problem will disappear.

Hopefully others here can download and test the problem:
http://www.planetsquires.com/files/Firefly_2_6_TextBox_Issue.zip
Title: Strange Text Box problem
Post by: TechSupport on March 02, 2006, 10:12:22 PM
I don't think that I did anything special to the code generation especially related to TextBoxes....

I recompiled the sample program using 2.50 and it also causes the garbled textbox.... although Marty reports that 2.50 does not cause garbled text. I will compile using an even older version and see what happens.
Title: Strange Text Box problem
Post by: TechSupport on March 02, 2006, 10:18:52 PM
It is garbled in v2.10 as well..... still weird.

WinXP Pro with Themes seems to be the common denominator.
Title: Strange Text Box problem
Post by: Roger Garstang on March 03, 2006, 12:30:33 AM
No problem on my end.  Could be the SelText bug I reported in the other thread of mine...you check for the value on focus change, but it is never created on text boxes in the last versions.  If it is missed, there may be other values missing too.  Some controls suddenly got Clip Styles too that shouldn't need them in their properties.
Title: Strange Text Box problem
Post by: Roger Garstang on March 31, 2006, 01:01:57 PM
Just got a report from a user that has an onboard Intel Graphics too and text is garbled on his, but not his other PC with ATI or any of mine with ATI.  Wasn't there a problem like this with multiline boxes sometime back to do with Opaque brushes or something?  When it was fixed, did it get applied to single line boxes too?  Seems to apply more to Right Aligned boxes too, although both can be garbled.
Title: Strange Text Box problem
Post by: TechSupport on March 31, 2006, 03:58:21 PM
I still don't know why it is a problem. It is okay on my WinXP Pro SP2 themed install, but garbles on another WinXP Pro machine.... The multiline problem was not WinXP specific so it was easy to fix.

I am just as confused as ever.
Title: Strange Text Box problem
Post by: Roger Garstang on March 31, 2006, 06:20:56 PM
Souns like we need to figure out what is common here besides video cards being Intel onboards...  Windows Fonts are kinda crazy anymore.  Seems like they use Alpha channels since if you print one font on fop of another it just makes the font darker.  Could be that each card draws just a little differently, and we need to change either the brush or the way it is drawing.
Title: Strange Text Box problem
Post by: Roger Garstang on March 31, 2006, 06:24:35 PM
Try changing the code in the %WM_CTLCOLOR... Color processing below:


If UCase$(FF_zTempString) = "EDIT" Then
               If (GetWindowLong( @ff_control.hWndControl, %GWL_STYLE) And %ES_MULTILINE) Then
                  SetBkMode FF_hDC, %OPAQUE
               End If
            Else
            End If  


to be:


If UCase$(FF_zTempString) = "EDIT" Then
  SetBkMode FF_hDC, %OPAQUE
End If  
Title: Strange Text Box problem
Post by: Roger Garstang on March 31, 2006, 06:35:16 PM
If this works, would it be possible to get a build with it, the SelText code you put in the Engine update for me:


Case %WM_SETFOCUS
        'If this is a TextBox, we check to see if we need to highlight the text.
        If ff Then
           If @ff.SelText Then
              SendMessage hWndControl, %EM_SETSEL, 0, -1
           Else
              SendMessage hWndControl, %EM_SETSEL, -1, 0
           End If
        End If          


My Colored Combo Dropdown code I posted in the Source code thread, and the INI Functions fixed?

No big rush as my customer probably won't be able to test till monday...but I have to get it all done by the 10th, and you know how much appearances matter in the business world...
Title: Strange Text Box problem
Post by: TechSupport on March 31, 2006, 08:19:13 PM
Thanks Roger... I will away most of tomorrow but I will try my best to squeeze out the changes for you. If not tomorrow night then most likely on Sunday.
Title: Strange Text Box problem
Post by: Jean-Pierre LEROY on April 01, 2006, 01:42:40 PM
I've done some tests this afternoon with the "test project".

I have an "NVIDIA GeForce4 MX 440" graphic card.

1. In FireFly, Environment Options, If "Enabled WinXP Theme support" is CHECKED, I get the problem Marty describe at the beginning of this thread.

2. In FireFly, Environment Options, If "Enabled WinXP Theme support" is NOT CHECKED, everythings are ok, I can edit the TextBox as usual.

I hope it could be of some help.
Jean-Pierre
Title: Strange Text Box problem
Post by: Roger Garstang on April 03, 2006, 12:45:00 PM
I modified the generated code on my app per the above code, and just confirmed with the customer that it fixed the problem.  So, the value needs to apply to all edit/text boxes, not just multiline.
Title: Strange Text Box problem
Post by: TechSupport on April 03, 2006, 01:38:15 PM
Thanks Roger, I have changed the code generation to apply to all text boxes - not just multiline ones.