Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
on mouseup
if the mouseloc is not within the rect of group "menu2" then
hide group "menu2"
enable btn "btnmenu" of grp "tab_bar"
end if
end mouseup
that i want is when i press the btn show up the menu and disable the btn.And when i click outside from group group, will be hided.
where i do wrong here?
The problem here is when i press the buttonthe menu is up,but the btn stay always disable it
thank you,still i cant make the mouseloc to work,i don't know where is wrong the script..
when i do the test in a new stack is working,when i go to original project to test it,is NO working
here is the complete code of the start stack.
global mydbid
on preopenstack
set the fullscreenmode of me to "exactfit"
-- use switch with "the environment" property to determine if the app is running on mobile or in development
switch the environment
case "development"
-- set default folder
set the itemdel to "/"
set the defaultfolder to item 1 to -2 of the effective filename of this stack
put "data.sqlite" into tDatabase -- using a variable to store the path to the database file rather than using the path directly in revopendatabase
break
case "mobile"
put specialfolderpath("documents") & "/data.sqlite" into tDatabase
if there is not a file tDatabase then
put URL ("binfile:" & specialfolderpath("engine") & "/data.sqlite") into URL ("binfile:" & tDatabase)
end if
break
end switch
-- path to aagDBLib the file. Just the stack name.
start using stack "aagDBLib"
get revOpenDatabase("sqlite",tDatabase,,,)
if it is a number then
dbSetDefaultConnectionID it
put it into mydbid
else
answer error it
end if
//set the accelatedRendering of this stack to true
end preopenstack
on mouseup
if the mouseloc is not within the rect of grp "menu_1" then
enable btn "mymenu" of grp "tab_bar"
hide grp "menu_1"
else
end if
end mouseup
on openstack
go to card startscreen
hide group "menu_1" of card basic
end openstack