move through lines of two fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
move through lines of two fields
Hi all, another strange question.
I've 2 list field filled with data (fldA, fldB)
after clicking on a line of fldA I must move to the previous, next line of it with 2 different buttons (btnDwn, btnUp) and hilite the new line.
the same with fldB.
Hendlers of the buttons should be the same for the 2 fields.
how can I tell to the buttons on which field I've clicked before?
can I store the name of the field selected to use in the buttons hndlers?
ciao
franco
I've 2 list field filled with data (fldA, fldB)
after clicking on a line of fldA I must move to the previous, next line of it with 2 different buttons (btnDwn, btnUp) and hilite the new line.
the same with fldB.
Hendlers of the buttons should be the same for the 2 fields.
how can I tell to the buttons on which field I've clicked before?
can I store the name of the field selected to use in the buttons hndlers?
ciao
franco
Re: move through lines of two fields
Hi Franco,
or variable
And use it to know which field is working
Best regards
Jean-Marc
You can use a customprophow can I tell to the buttons on which field I've clicked before?
can I store the name of the field selected to use in the buttons hndlers?
Code: Select all
set the uMyWorkField of this cd to the short name of the target
Code: Select all
put the short name of the target into gMyWorkField
Best regards
Jean-Marc
https://alternatic.ch
Re: move through lines of two fields
Hi Jean-Marc,
thanks a lot. just one thing, you wrote to set the custom property of this cd (card), maybe you meant of fld "myfld" ?
so it work
and something like this in the btnDwn script to move down through le lines
there is a problem here:
"put the cNomeFld of fld "fldDoc" into tNomeFld" I must declare the name of the object. so, we return to the initial problem, some time the filed will be "fldA" other will be "fldB"
maybe better a global variable like in your second option, to put empty before to use.
ciao
franco
thanks a lot. just one thing, you wrote to set the custom property of this cd (card), maybe you meant of fld "myfld" ?
so it work
Code: Select all
set the cNomeFld of fld "fldDoc" to the short name of the target
Code: Select all
on mouseUp
put the cNomeFld of fld "fldDoc" into tNomeFld
put the hilitedline of fld tNomeFld into tLineNumber ## What line has been clicked:
add 1 to tLineNumber
set the hilitedline of fld tNomeFld to tLineNumber
end mouseUp
"put the cNomeFld of fld "fldDoc" into tNomeFld" I must declare the name of the object. so, we return to the initial problem, some time the filed will be "fldA" other will be "fldB"
maybe better a global variable like in your second option, to put empty before to use.
ciao
franco
Re: move through lines of two fields
Hi Franco,
then
When a line is cliqued on a fld
and in btn
Best regards
P.S. You have maybe to decide if you can have two flds with selected lines or not
No.That can't work likeyou wrote to set the custom property of this cd (card), maybe you meant of fld "myf
then
When a line is cliqued on a fld
Code: Select all
set the cNomeFld of this cd to the short name of the target
Code: Select all
on mouseUp
put the cNomeFld of this cd into tNomeFld
put the hilitedlines of fld tNomeFld into tLineNumber ## What line has been clicked:
add 1 to tLineNumber
set the hilitedline of fld tNomeFld to tLineNumber
end mouseUp
P.S. You have maybe to decide if you can have two flds with selected lines or not
https://alternatic.ch
Re: move through lines of two fields
Jean-Marc,
I'm late.. and yuk
I was in the shower when, like lightning in my head, I understood your suggestion.
the custom property of the card, is available to set and is unique from any script, it works great.
thanks again, ciao
franco
I'm late.. and yuk

I was in the shower when, like lightning in my head, I understood your suggestion.
the custom property of the card, is available to set and is unique from any script, it works great.
this was settled yet. in the mouse up of each filed:jmburnod wrote: ...
P.S. You have maybe to decide if you can have two flds with selected lines or not
Code: Select all
set the hilitedline of fld fldDoc to 0
franco