Tab with button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Tab with button
I can't figure this one out. what I have is a inspection form that we fill out and depending on what we are inspecting we end up using N/A alot.
what I want is a button that:
Put "N/A" into the selection
and
select the next field
If i manually hit enter or tab it will do this but I'm not sure how to send an enter or tab code properly
Put cr or Tab is not the answer, already tried that
what I want is a button that:
Put "N/A" into the selection
and
select the next field
If i manually hit enter or tab it will do this but I'm not sure how to send an enter or tab code properly
Put cr or Tab is not the answer, already tried that
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Tab with button
Hi.
It depends on how your fields are ordered. So when you say "the next field" we need a way to find which one that is. Perhaps this can be done by field number. Make a few fields on a new card and one button. Put this into the button script.
Set the cursor into the first field you made, and click...
Now there is a problem with this short script. Can you fix it?
If there is some other way you want to arrange what the "next field" is, we need to talk. Write back if you get stuck.
Craig Newman
It depends on how your fields are ordered. So when you say "the next field" we need a way to find which one that is. Perhaps this can be done by field number. Make a few fields on a new card and one button. Put this into the button script.
Code: Select all
on mouseUp
put the number of the selectedField into currentField
put "N/A" into the selection
select the text of fld (currentField + 1)
end mouseUp
Now there is a problem with this short script. Can you fix it?
If there is some other way you want to arrange what the "next field" is, we need to talk. Write back if you get stuck.
Craig Newman
Re: Tab with button
This works! however.... now i have another problem. When using this new button it ignored the closeField script I have in the field.
I fixed it:
I fixed it:
Code: Select all
on mouseUp
put the number of the selectedField into currentField
put "N/A" into the selection
send closeField to fld currentField
select the text of fld (currentField + 1)
end mouseUp
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Tab with button
Right on.
So I guess field layer numbering is OK with your setup?
And sometimes the order of handler execution matters; I think you are right in leaving the "select text" line last in the button handler. It is possible to lose field focus with this sort of thing if it gets more complicated.
But you did not encounter a little problem after clicking the button a few times? Should have...
Craig
So I guess field layer numbering is OK with your setup?
And sometimes the order of handler execution matters; I think you are right in leaving the "select text" line last in the button handler. It is possible to lose field focus with this sort of thing if it gets more complicated.
But you did not encounter a little problem after clicking the button a few times? Should have...
Craig
Re: Tab with button
I must admit, it took me a while to fix tab order after I had moved about 20 fields around. but I found it in the property inspector under size and position. lucky for me I found that last week so this worked out great.
Since I brought it up and am not 100% sure I guess I could ask. Layer number is what I ended up editing on the fields and made that chronological. My question is, is the number assigned to a field here per card or per stack? And is this the correct way to do it?
Since I brought it up and am not 100% sure I guess I could ask. Layer number is what I ended up editing on the fields and made that chronological. My question is, is the number assigned to a field here per card or per stack? And is this the correct way to do it?
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Tab with button
Fields are layer specific to each card.
Background fields may common to each card, and the layer they have depends on when other objects were added to that card.
Note that the number of a field is not the same as the layer that field is on. Do you have this down pat? A mixture of buttons and fields, say, added to a card, will take successive layers. But fields, say, will number themselves only within their class.
Craig
Background fields may common to each card, and the layer they have depends on when other objects were added to that card.
Note that the number of a field is not the same as the layer that field is on. Do you have this down pat? A mixture of buttons and fields, say, added to a card, will take successive layers. But fields, say, will number themselves only within their class.
Craig