Polimeno
01-20-2009, 05:47 PM
i have two activeX tabs, ONE and TWO
each one has a pickbutton inside a subrollout
when i pick an object, the pickbutton display the name and works properly like i want, but when i move back and forth by clicking the tabs, the names are gone.....and i guess their still maintain the objects....and properties....
and i set the rightclick to clean all the properties....
someone can tell me how i set a function to update the view and leave the button working fine ??
my test :
--test polimeno ACTIVE X
rollout Rol_1 "test 1"
(
---------------
------ Ui ------
---------------
group "1"
(
pickbutton pbt "" offset:[0,0] tooltip:"pick point yellow"
) --end of group
---------------
-- Handlers ---
---------------
on pbt picked obj do
(
p1Obj = obj
if p1Obj != undefined
then
(
PtPick = obj
pbt.text = obj.name
flashNodes #(PtPick)
forceCompleteredraw()
global ptP_ = pbt.object
print (ptPick)
print (theClass)
print (pt_1)
print (theCategory)
print (ptP_)
)
else
(
obj = undefined
ptP_ = undefined
pbt.text = ""
print (obj)
print (ptP_)
)
)
on pbt rightclick do
(
clearListener ()
pbt.object = undefined
ptP_ = undefined
pbt.text = ""
print ("clear...1")
clearselection ()
)
)--end rollout
rollout Rol_2 "test 2"
(
---------------
------ Ui ------
---------------
group "2"
(
pickbutton p2 "" offset:[0,0] tooltip:"pick obj 2"
)--end of group
---------------
-- Handlers ---
---------------
on p2 picked obj do
(
if obj != undefined
then
(
PtPick2 = obj
p2.text = obj.name
flashNodes #(PtPick2)
forceCompleteredraw()
global ptP_2 = p2.object
print (ptPick2)
print (ptP_2)
)
else
(
obj = undefined
ptP_2 = undefined
p2.text = ""
print (obj)
print (ptP_2)
)
)
on p2 rightclick do
(
POBJ = p2.object
print (POBJ)
p2.text = POBJ.name as string
)
)--end rollout
---------------
-- UI activeX --
---------------
rollout taX "Active X test"
(
activeXcontrol acx_tabs "MSComctlLib.TabStrip.2" height:20
subRollout mySubRol "" height: (taX.height - 45)
on acx_tabs Click do
(
IndexTabs_ = acx_tabs.SelectedItem.index
case IndexTabs_ of
(
1:
(
removeSubRollout mySubRol Rol_2
addSubRollout mySubRol Rol_1
acx_tabs.tabs[1].HighLighted = true
acx_tabs.tabs[2].HighLighted = false
)
2:
(
removeSubRollout mySubRol Rol_1
addSubRollout mySubRol Rol_2
acx_tabs.tabs[1].HighLighted = false
acx_tabs.tabs[2].HighLighted = true
)
)
)-- end rollout
---------------
-- Handler X --
---------------
on taX open do
(
acx_tabs.tabs[1].caption = "ONE"
acx_tabs.tabs.add pvCaption:"TWO"
addSubRollout mySubRol Rol_1
)--end rollout
)--end
createDialog taX 360 640
thanks.
each one has a pickbutton inside a subrollout
when i pick an object, the pickbutton display the name and works properly like i want, but when i move back and forth by clicking the tabs, the names are gone.....and i guess their still maintain the objects....and properties....
and i set the rightclick to clean all the properties....
someone can tell me how i set a function to update the view and leave the button working fine ??
my test :
--test polimeno ACTIVE X
rollout Rol_1 "test 1"
(
---------------
------ Ui ------
---------------
group "1"
(
pickbutton pbt "" offset:[0,0] tooltip:"pick point yellow"
) --end of group
---------------
-- Handlers ---
---------------
on pbt picked obj do
(
p1Obj = obj
if p1Obj != undefined
then
(
PtPick = obj
pbt.text = obj.name
flashNodes #(PtPick)
forceCompleteredraw()
global ptP_ = pbt.object
print (ptPick)
print (theClass)
print (pt_1)
print (theCategory)
print (ptP_)
)
else
(
obj = undefined
ptP_ = undefined
pbt.text = ""
print (obj)
print (ptP_)
)
)
on pbt rightclick do
(
clearListener ()
pbt.object = undefined
ptP_ = undefined
pbt.text = ""
print ("clear...1")
clearselection ()
)
)--end rollout
rollout Rol_2 "test 2"
(
---------------
------ Ui ------
---------------
group "2"
(
pickbutton p2 "" offset:[0,0] tooltip:"pick obj 2"
)--end of group
---------------
-- Handlers ---
---------------
on p2 picked obj do
(
if obj != undefined
then
(
PtPick2 = obj
p2.text = obj.name
flashNodes #(PtPick2)
forceCompleteredraw()
global ptP_2 = p2.object
print (ptPick2)
print (ptP_2)
)
else
(
obj = undefined
ptP_2 = undefined
p2.text = ""
print (obj)
print (ptP_2)
)
)
on p2 rightclick do
(
POBJ = p2.object
print (POBJ)
p2.text = POBJ.name as string
)
)--end rollout
---------------
-- UI activeX --
---------------
rollout taX "Active X test"
(
activeXcontrol acx_tabs "MSComctlLib.TabStrip.2" height:20
subRollout mySubRol "" height: (taX.height - 45)
on acx_tabs Click do
(
IndexTabs_ = acx_tabs.SelectedItem.index
case IndexTabs_ of
(
1:
(
removeSubRollout mySubRol Rol_2
addSubRollout mySubRol Rol_1
acx_tabs.tabs[1].HighLighted = true
acx_tabs.tabs[2].HighLighted = false
)
2:
(
removeSubRollout mySubRol Rol_1
addSubRollout mySubRol Rol_2
acx_tabs.tabs[1].HighLighted = false
acx_tabs.tabs[2].HighLighted = true
)
)
)-- end rollout
---------------
-- Handler X --
---------------
on taX open do
(
acx_tabs.tabs[1].caption = "ONE"
acx_tabs.tabs.add pvCaption:"TWO"
addSubRollout mySubRol Rol_1
)--end rollout
)--end
createDialog taX 360 640
thanks.
