April 19, 2024, 05:32:54 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Set Focus problem in EditBox

Started by billhsln, June 04, 2015, 01:08:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billhsln

June 04, 2015, 01:08:35 PM Last Edit: June 22, 2015, 11:32:45 PM by billhsln
This is a more general PDF database with search for keywords program.  Kind of a better replacement for the Recipe program (in other words, more what my friend was looking for).

My problem is that after I 'Load New File' and display the PDF file, it does not setfocus to the d1_e1 field so I can start typing the Description right away.  I have to click in the Description field before I can start typing.  It is probably some thing simple that I am missing, at least I hope so.  I have moved the SetFocus statement around, but thought that it would work better as the last command performed.  But I still can not just start typing the description in without clicking in the d1_e1 field. See line 194.

Thanks for any help,
Bill

PS, I am doing this as a project only because my friend is using AVAST Antivirus and it gives a false positive for virus if I don't.

This is a newer version (1.4) with more features and fixed a few problems.

2015-06-23 Added recipes to play with.
When all else fails, get a bigger hammer.

LarryMc

I looked at it but couldn't figure out what was suppose to be happening.
I finally figured out I was suppose to create a a database myself. that will contain the keywords and descriptions
but I don't see how different recipes are separated and I couldn't figure out what control wasn't getting the focus when.
It kept telling me to select a pdf to open and the only pdf there was to open was your supplied little help pdf which wasn't doing anything for me.  And then there were times it was trying to open MSOffice which I don't have on my computer so that was a bust.
I guess I'm just having a slow day but I don't have a clue how this is suppose to be working therefore I can't even begin to try and help.  Sorry.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

June 22, 2015, 11:33:16 PM #2 Last Edit: June 22, 2015, 11:37:56 PM by billhsln
Revised my question and added some recipes to play with.  Also, the program should create a new Database automatically when you give it a name.  However you will need MS Access or its runtime and must allow whatever subdirectory that you store the program in to use Access.  Working on switching it to use SQLite3 to remove need for MS Access.  This is a more complete version with a nicer Icon.  Still some minor tweeks that I might want to add, but right now it is pretty much fully functional.

Bill
When all else fails, get a bigger hammer.

LarryMc

QuoteMy problem is that after I 'Load New File' and display the PDF file, it does not setfocus to the d1_e1 field so I can start typing the Description right away.  I have to click in the Description field before I can start typing.

I created a dbase file and clicked "Load New File". I selected the 1st recipe from those you provided;; the pdf was displayed and the Description field automatically was assigned the focus as you desired.

Shutdown the program and repeated the process several several times.  worked every time.

might be a speed issue.  try putting one or more WAIT 1 statements right before your SETFOCUS statement and see if that helps you.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

A single WAIT 1 fixed the problem.  Funny how a single simple statement can make such a difference.

Thank you, Larry,
Bill
When all else fails, get a bigger hammer.

LarryMc

that's why they pay me the big bucks  ;D ::) ;D ::) ;D :o ;D :'(
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library