Home » Developer & Programmer » Forms » focus lost (forms 6, win XP)
focus lost [message #402962] Wed, 13 May 2009 05:10 Go to next message
adas313
Messages: 5
Registered: April 2009
Junior Member
Hello everyone,

I have a strange problem with go_item(some_text_item).

As this is a restricted procedure I have to call it via timer.

It works only one time, later the focus is lost. After mouse click on the item the situation repeats.

I turned off all other timers, but it did not help. Inserting this 'go_item' in any trigger which can call it also does not work.

What is funny: if I put any message box right after this 'go_item' - then cursor goes to the desired item.

I will appreciate any help.

Re: focus lost [message #402965 is a reply to message #402962] Wed, 13 May 2009 05:21 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You have explained what you have done so far.

Perhaps you might also want to tell what is the problem that you are trying to solve.
Re: focus lost [message #402969 is a reply to message #402965] Wed, 13 May 2009 05:28 Go to previous messageGo to next message
adas313
Messages: 5
Registered: April 2009
Junior Member
Cursor which should go to text item is lost. It seems like go_item does not work.
Re: focus lost [message #403643 is a reply to message #402969] Sun, 17 May 2009 20:03 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
It sounds as though something else is happening in your form but just try placing a 'synchronize' after the 'go_item'.

David
Re: focus lost [message #403835 is a reply to message #403643] Tue, 19 May 2009 02:27 Go to previous messageGo to next message
adas313
Messages: 5
Registered: April 2009
Junior Member
Thank you for reply, but it does not work also.

I think that the problem is more complicated. What I have not written (I thought it was not important, however I feel I was wrong - sorry for that) is that the event is generated be tree ocx control.

When user clicks a treenode, then cursor should go to a specific record (depending on treenode, but this is not important here).

I have tried two ways:

(1) In event procedure I have created a timer in which there is "go_item".

(2) I dispatch event with RESTRICTED_ALLOWED option, and in event procedure I put "go_item" command directly. I have done it with every event in the package.

Both attempts failed, and focus is still set on the ocx control.
Re: focus lost [message #403850 is a reply to message #403835] Tue, 19 May 2009 03:46 Go to previous messageGo to next message
TonyJaa
Messages: 50
Registered: May 2009
Member
Hi,

what happens if you increase the delay of the timer (5 seconde for example )?

Is it possible to make the ocx control non-navigable ?

Re: focus lost [message #403900 is a reply to message #403850] Tue, 19 May 2009 08:24 Go to previous messageGo to next message
adas313
Messages: 5
Registered: April 2009
Junior Member
Thank you for reply.

TonyJaa wrote on Tue, 19 May 2009 03:46
Hi,

what happens if you increase the delay of the timer (5 seconde for example )?




Nothing changes.

Quote:

Is it possible to make the ocx control non-navigable ?



It seems that it is. However this has no effect too.


Re: focus lost [message #404507 is a reply to message #403900] Fri, 22 May 2009 00:56 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
In what trigger are you placing this code? Have you reviewed the entries in this forum for 'hierarchy' and 'tree' because they seem to be able to make it work?

Post your code.

David
Re: focus lost [message #405020 is a reply to message #404507] Tue, 26 May 2009 01:43 Go to previous message
adas313
Messages: 5
Registered: April 2009
Junior Member
Hello,

my teammate managed to solve this problem.

What helped was "clicking" in the desired field by WinAPI procedure.

Previous Topic: Create Next/Previous Record button logic ?
Next Topic: HOW TO CALL PROCEDURE IN ORACLE FORMS TREE
Goto Forum:
  


Current Time: Sun Dec 04 19:07:38 CST 2016

Total time taken to generate the page: 0.07368 seconds