The TextArea control in Windows has some serious issues. I’m building a grid based on a canvas, using some container controls for user input.
I made a video and some screenshots demonstrating some of the stuff I encountered (so far)
http://gorgeousapps.com/TextAreaProblems.mp4
The setup:
-
The container control:
-
The form with the grid canvas and the container control open:
The issues in the video:
1.
Issue: ScrollWheel does not work as expected
Action: I click in the Textarea to gain focus and use the ScrollWheel
Result: Textarea does not catch the MouseWheel, but the underlaying GridCanvas does
2.
Issue: Scrollbar does not work
Action: I try to move the ScrollBar of the TextArea
Result: Scrollbar is ignored and a text selection is done
3.
Issue: ScrollBar buttons do not work
Action: Clicking on the down and up buttons
Result: Down button works, up button is ignored
4.
Issue: Although being not-styled, able to insert non-styled objects
Action: Pasting a picture
Result: Picture is inserted into the textarea and should be ignored
5.
Not demonstrated in this video, but clicking on the ContainerControl is sometimes ignored and ‘bleeds through’ to the underlying canvas.
I think a lot of issues are because Xojo messes up the ZOrder of things. Also the ‘bleeding through’ of events is causing troubles.
Some program languages can solve this very elegantly:
- Check the mouse ZOrder from top to bottom
- If an event (like MouseDown) is ‘catched by a layer’ (could be just by declaring the event in Xojo), the event is not sent to the underlaying layers.
Related to 2: pressing the OK button (using the enter key in Action should stop there). Now it also raises the KeyDown event of the underlying canvas. As a hack, I have now a ‘switch’ that ignores it if it comes from Action.
A similar ‘Switch’ hack was needed for the shadow part of the container control, as the paint event was called twice, but only the first time the canvas was cleared. The result was a very fat shadow.
I apoligize if I sound annoyed, but this kind of stuff makes it very hard to build professional software with Xojo. I love it that we will get Raspberry Pi support, but a serious Windows cleanup cycle is absolutely needed. I’m not doing something weird here, this is very basic stuff any programmer expects from a programming language.
Note: I would’ve entered these issues in the feedback app, but it keeps crashing halfway entering the report.
I’m prepared to send my code to a Xojo Tech (as this a proof of concept my boss asked to show Xojo is the right tool). Last year I may have won the tough battle to stay with Xojo instead of .NET, but I have a feeling I’m finally losing the war. Give me some ammunition Xojo, I’m getting slaughtered here…