* How to set focus of newly created record?
How to set focus of newly created record?
I have just written my first LUA plugin to create a new Source record. Can anyone tell me how I can get FH to focus on the record I have just created? ie to bring up the properties window for the new record?
Many Thanks
ID:5819
Many Thanks
ID:5819
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
How to set focus of newly created record?
You can't control the Property box directly, but you can use the result set to return the record and then double click on it to edit it.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
How to set focus of newly created record?
Could you explain further how I could do this pls?
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
How to set focus of newly created record?
In the help look at the following functions
fhOutputResultSetColumn
fhOutputResultSetTitles
You can then add your new source record pointer to a table using clone() and then use fhOutputResultSetColumn
When the plugin ends the result set will be displayed.
There is an example of the use in the help and you can see a full working example, in the Search and return result set plugin : Source Code for Search and Return
fhOutputResultSetColumn
fhOutputResultSetTitles
You can then add your new source record pointer to a table using clone() and then use fhOutputResultSetColumn
When the plugin ends the result set will be displayed.
There is an example of the use in the help and you can see a full working example, in the Search and return result set plugin : Source Code for Search and Return
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
How to set focus of newly created record?
Many thanks for the help/links.
Its' rather an awful lot to code up just to point to a record ... is there any chance this could be included in the API since I suspect it would be useful in quite a few situations?
Its' rather an awful lot to code up just to point to a record ... is there any chance this could be included in the API since I suspect it would be useful in quite a few situations?
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
How to set focus of newly created record?
It's only about 6 lines, plugins currently don't control the interface other that via the result set.
I suspect it won't make it in to 5, but agree a set Property Box on end of plugin might be useful on for the wish list once 5 is released.
Don't forget if you want to allow editing you could always add a iup window to maintain the fields you want to. This is what I do for the GRO plugin.
http://www.family-historian.co.uk/plugi ... try?id=138
I suspect it won't make it in to 5, but agree a set Property Box on end of plugin might be useful on for the wish list once 5 is released.
Don't forget if you want to allow editing you could always add a iup window to maintain the fields you want to. This is what I do for the GRO plugin.
http://www.family-historian.co.uk/plugi ... try?id=138
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
How to set focus of newly created record?
Thanks again ... I am already using a iup window but really just wanted to exit back to FH (with the new record selected) once the record has been created. I could re-write the plug in to hold all the source info and hence not need the properties window but then I'd just be re-writing the existing FH functionality. .... Hmmmm will put my thinking hat on again.
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
How to set focus of newly created record?
The results set window works pretty well and you only have to add the one line, and then click on it so it's not too tricky.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
How to set focus of newly created record?
Finally got there! Thanks again 