Make a stack close (or hide) after a click in a datagrid
Posted: Tue May 12, 2015 1:53 pm
I have a question regarding closing or hiding a stack
When clicking in a field, a stack (called ClickLists) is openend.
On every card of that stack is a datagrid with items the user can click on.
Clicking on a line of the list puts that choice into the field, from where the stack was openend.
After that I want the stack "ClickList" to dissappear without having to click a second time, hide or close, both are ok.
When I put
"Hide this stack" at the end of the script, the stack only closes when I click for a second time.
When I put
"Close this stack", the whole application starts to close, which I don't want, but also after the second click.
When I put
"break" or "pass" or "exit to top" after the line, it does not close after the first click.
When I do
send HideStack to the stack "ClickList" from the original field, it also does not work
Does someone have the answer?
Please find below the 2 scripts who are involved
1. This is the script from the field. (fld "TherapyName" of card "People" of stack "Screens")
on OpenField
open stack "ClickList"
go to card "TherapyList"
set the label of stack "ClickList" to "Therapy list"
set the loc of stack "ClickList" to 796,543
show stack "ClickList"
send "SelectTherapyList" of card "TherapyList" of stack "ClickList"
end OpenField
2. This is the script from the datagrid (of card "TherapyList" of stack "ClickList")
on mouseUp pBtnNum
if pBtnNum is 1 then
put the dgHilitedLines of group "TherapyList" into theLine
put the dgDataOfLine[theLine] of group "TherapyList" into theDataA
put theDataA["ProductName"] into fld "TherapyName" of card "People" of stack "Screens"
end if
hide stack "ClickList"
end mouseUp
thanks
Rob van der Sloot
When clicking in a field, a stack (called ClickLists) is openend.
On every card of that stack is a datagrid with items the user can click on.
Clicking on a line of the list puts that choice into the field, from where the stack was openend.
After that I want the stack "ClickList" to dissappear without having to click a second time, hide or close, both are ok.
When I put
"Hide this stack" at the end of the script, the stack only closes when I click for a second time.
When I put
"Close this stack", the whole application starts to close, which I don't want, but also after the second click.
When I put
"break" or "pass" or "exit to top" after the line, it does not close after the first click.
When I do
send HideStack to the stack "ClickList" from the original field, it also does not work
Does someone have the answer?
Please find below the 2 scripts who are involved
1. This is the script from the field. (fld "TherapyName" of card "People" of stack "Screens")
on OpenField
open stack "ClickList"
go to card "TherapyList"
set the label of stack "ClickList" to "Therapy list"
set the loc of stack "ClickList" to 796,543
show stack "ClickList"
send "SelectTherapyList" of card "TherapyList" of stack "ClickList"
end OpenField
2. This is the script from the datagrid (of card "TherapyList" of stack "ClickList")
on mouseUp pBtnNum
if pBtnNum is 1 then
put the dgHilitedLines of group "TherapyList" into theLine
put the dgDataOfLine[theLine] of group "TherapyList" into theDataA
put theDataA["ProductName"] into fld "TherapyName" of card "People" of stack "Screens"
end if
hide stack "ClickList"
end mouseUp
thanks
Rob van der Sloot