On Sep 28, 2006, at 9:02 AM, Carlos M wrote:

I tested on Win2K and XP and I could not make it break, but I found some problems:

1. With the Delete key [Asc(127)], when NO chars are selected (highlighted): Note: the exclamation char on the examples represents the insertion point. The Delete key should delete the char after the insertion point and not the previous one.
  Examples:
  - 1234!5, it should delete 5 - it's deleting 4
  - 12345!, it should not delete anything - it's deleting 5

When there's one or more chars selected it deletes correctly.

The Backspace key [Asc(8)] is working fine as it deletes the previous character.

I grouped these two keys into the same behavior... I think that the "Delete" key behavior is different on the Macintosh than Windows, but I need to test this on my extended keyboard. This will be fixed.

2. The highlight color you are using (when selecting the chars) is wrong on Windows. You should use the system's highlight color (HighlightColor Function). But then you will have the problem with the text color on Windows XP as text can be black or white, depending on the XP theme. On Win2K (and previous versions) you can use white for text color and also white on XP for the default (blue) theme. On XP with the Silver theme the text should be black. How do you know what theme on XP is being used? I don't know :( Maybe Aaron has some APIs on his WFS.

I am using a custom color and not the Highlight color. I was mostly doing this because I didn't want to have to invert the text color on Windows, but this is not a problem since I have a method to evaluate Highlight text inversion. This will be fixed.

What I am more concerned with is: Does an obviously Macintosh OS X control look odd on a Windows computer?

3. Edit Menus:
- The Edit->Delete menu is deleting all chars instead of only the selected chars. It deletes also everything even if no text is selected. - The Edit->Delete menu is enabled when no chars are selected or no text is present.
- The Edit->Select All menu is enabled when no text is present.

I didn't do too much testing with the Edit->Delete MenuItem (EditClear). I was not aware that it only cleared selected text. This will be fixed as well as Enabling/Disabling the item.

In most applications I have seen, Select All is always enabled... but it is not a problem to modify this.

4. Moving fields with the tab key:
On Windows when you use the tab key to move to the next/previous control, any text that is selected on an EditField does not have any visual effect once it loses focus - you are showing a different highlight color (grey) and on Windows there's no highlight color once an editfield loses focus.

Good point.

How does a Windows EditField behave when the control has the Focus within the Window and there is text selected but the Window is deactivated (in the background)? Does it display a gray selection, or does it display no selection?

BUT when you use the tab to move to an EditField any text on the field gets selected even if it was not previously selected. When using the mouse to select an EditField, the text is never highlighted even if it was before losing focus. If I was not clear with this, just let me know and I'll try to explain it in a different way.

This is my own personal style. I personally feel that it is more likely that a user would want to replace the search text when they activate the control. I can change this automatic behavior to be part of the exposed GotFocus() event for my apps and leave the normal behavior for the class.

5. There's also some problems when trying to select the text with the mouse: - If the insertion point is at beginning of text and you start selecting char by char with the mouse, when it reaches the last char all text gets unselected, but continuing to move the mouse to the right (after the last char) all text gets again selected. - If the insertion point is at the end of text and you position the mouse pointer at the end and start moving the mouse to the left, all text gets selected when the mouse pointer is next (but not over) the last char - once the mouse pointer is over the last char everything starts working fine and chars are selected correctly while continuing to move the mouse to the left.

Sounds a bit like what Arnaud was describing.  I will look into it.

6. I also fond that the following is not working on Windows - don't know if you already implemented it or not:

Home [Asc(1)] and PageUp [Asc(11)]:
 - It should move the insertion point to the beginning of the text.

Shift + Home [ShiftKey + Asc(1)] and Shift + PageUp [ShiftKey + Asc (11)]:
 - It should select all chars before the insertion point

End [Asc(4)] and PageDown [Asc(12)]:
 - It should move the insertion point to the end of the text.

Shift + End [ShiftKey + Asc(4)] and Shift + PageDown [ShiftKey + Asc (12)]:
 - It should select all chars after the insertion point

Shift + DownArrow [ShiftKey + Asc(31)]: it should select all chars after the insertion point Shift + UpArrow [ShiftKey + Asc(30)]: it should select all chars before the insertion point

I did not implement any of these.  I will work on it.

Just one question. Why aren't you using a normal editfield without a border over a canvas? I think you will have a lot of work to get it working correctly just for Windows :-)

I actually implemented this control as a ContainerControl first using a borderless EditField... but there were some major problems with the EditField moving out of position (even though it had the correct values in code). There was also a problem that the EditField cannot have a transparent background, and I could not get the EditField small enough to fit and look centered on the SearchField.

And since I needed to implement text selection anyways (see earlier post about selectable StaticText controls), I did not think that it would be that much more work to add text input.

Thanks for taking the time to look at this for me, and I will let you know when I fixed these issues.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to