Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Double Focusing Problem in ElXTree

I'm using ElXTree as a grid in my program. Whenever I select a cell, that
row gains focus and becomes highlighted, just as I want it.

When I invoke the supplied Inplace editor by clicking on a cell in the grid,
that row gains focus. Because the cell is selected in edit mode, only the
cell gets highlighted (not the whole row), also just as I want it.

What I don't want is this: When I'm inplace editing one cell, and I invoke
the inplace editor for another cell by clicking on it, first the row with
the old cell is given focus and is highlighted. It then immediately has its
focus taken away and is unhighlighted and the row with the new cell is given
focus and highlighted. Then that new row immediately becomes unhighlighted
except for the cell being inplace edited. This causes an annoying double
flashing and I want to get rid of it.

Is there any way I can get around this double focusing problem I'm having?

Louis Kessler
Winnipeg, Manitoba, Canada

Comments

  • 4 Comments sorted by Votes Date Added
  • Do you use any additional code to begin item editing immediately after user clicks to another item?
  • edited June 2011 Posts: 18Vote Up0Vote Down
    No I didn't. It is a problem with ElXTree. I just found that I can make the problem happen in one of your demos.

    1. Go to your MegaDemo_ElXTree. I am using your d12 version for Delphi 2009.

    2. In the form for unit d_LMDElXTree_InplaceEdit, change Align from alClient to alLeft, and then change Width to 400.

    3. Add a panel to the right hand area and set its Align to alClient.

    4. Add a button onto that panel, and in its ButtonClick event put:
    Application.MessageBox('You clicked on me.', 'Yes', MB_OK);

    5. Now start the application and go to the Inplace editors page.

    6. Do something to make the ElXTree active without being in the inplace editor, e.g. Click on the + sign before the 1.

    7. Now click on the button and the message pops up as it should. Press OK to close it.

    8. Now go into one of the inplace editors, e.g. click on "Louis".

    9. Now click the button. All it does is get out of inplace editing. It does NOT execute the button. You have to click the button again for it to get executed.

    That's the problem in 9. You should be able to click the button and it should take you out of inplace editing AND execute the button.

    Louis
  • Oh I'm bad. The above example is for my "How Can I Exit My Inplace-Editor AND Process the Button?" question I asked on the lmd.public.vcl.elpack newsgroup. And there you said that you found the problem but don't have an answer yet.

    But now I'm trying to recreate this double focusing problem in your demo and I can't. Maybe this is my problem. I'll research some more.
Sign In or Register to comment.