How to use Locators on a graphic in a tabview

Background: I want to split graphics in a Manipulate in several parts in a tabview control. But the tabview somehow interferes with the locators as in the following simplified example:

 Manipulate[
TabView[{aa -> Graphics[Line[{{0, 0}, p}], PlotRange -> 1],
bb -> 1}] , {{p, {1, 1}}, Locator}]


Question: How to use Locators on a graphic in a tabview. ( How to get the snippet above working ? )

EDIT:

I left out too much in the previous example, this is a better description.

  Manipulate[
pts1 = pts;
TabView[{
a -> Graphics[Line[pts1]],
b -> Graphics[Line[pts]]}],
{{pts, ptsI}, Locator, LocatorAutoCreate -> All},
Initialization -> {pts = {{0, 0.5}, {0, 0.6}}}]


So, there is one set of data, in this example pts. In one part of the display (A) the data is modified, the data is then shown on ( B ). -

-

Maybe something like

Manipulate[pts1 = p; pltrng = {{-1, 1}, {-1, 1}};
pnts = LocatorPane[Dynamic[p, {(pts1 = p; p = #) &, (p = #) &}],
Dynamic@Graphics[Point[p], PlotRange -> pltrng],
LocatorAutoCreate -> True];
tbl = Dynamic[Grid[Table[With[{i = i}, {i, Dynamic[pts1[[i]]]}], {i, Length@pts1}]]];
ln = Dynamic@  Graphics[{Red, Thick, Line[pts1]}, PlotRange -> pltrng];
bzc = Dynamic@ Graphics[{Blue, BezierCurve[pts1]}, PlotRange -> pltrng];
dsk = Dynamic@ Graphics[{Orange, Disk[#, .1] & /@ pts1}, PlotRange -> pltrng];
plygn = Dynamic@ Graphics[{Green, Polygon[pts1]}, PlotRange -> pltrng];
allviews =  Grid[{{pnts, tbl, dsk}, {ln, bzc, plygn}}, Dividers -> {All, All}];
TabView[{"locators" -> pnts, "table" -> tbl, "line" -> ln, "beziercurve" -> bzc,
"disks" -> dsk, "polygon" -> plygn, "all" -> allviews},
Alignment -> Center],
{{p, {{-.5, -0.5}, {-.25, .5}, {.6, 0.6}}}, None}]


-
Very nice! I think this is exactly what he had in mind. However, the LocatorAutoCreate doesn't work as expected for me... Instead of creating a new one, it simply moves the previously selected one. –  R. M. May 14 '12 at 2:45
@R.M Works OK for me. Remember to press "Alt - Mouse Click" instead of just "Mouse Click" to create a Locator –  belisarius is forth May 14 '12 at 3:49
@R.M and belisarius thank you for the votes. I had to change the setting for LocatorAutoCreate to True from All in OP's question. With this setting, as belisarius notes, one needs to use Alt-Click to create a new locator. –  kglr May 14 '12 at 4:24
@belisarius Ah, thanks. Cmd-click for me. Indeed, it was because of what kguler says in his comment... I tried the OP's code which had All and created locators with a simple click and tried that here too :) –  R. M. May 14 '12 at 4:30
@ndroock1, glad it worked for you. –  kglr May 14 '12 at 6:31

One way to get it working is to do something like

Manipulate[TabView[{
aa -> LocatorPane[Dynamic[p], Dynamic@Graphics[Line[{{0, 0}, p}], PlotRange -> 1]],
bb -> 1}],
{{p, {1, 1}}, None}]

-
This one has the additional benefit of allowing the usage of Dynamic[p] on the second tab –  belisarius is forth May 13 '12 at 19:05
This works Heike, it may or may not be a solution to my problem but it definitely gives me something to study and work on. I just need a LOT of screen real estate to display graphics and manipulate it with controls. The best way to handle this is with tabs in my opinion and a lot of programs work like that. –  ndroock1 May 13 '12 at 19:09
I have edited ( improved ) the question. Your solution did not work ( immediately ) but I am still working with your idea. –  ndroock1 May 13 '12 at 19:34

You can move the TabView outside the Manipulate and it works:

TabView[{
aa -> Manipulate[Graphics[Line[{{0, 0}, p}], PlotRange -> 2], {{p, {1, 1}}, Locator}],
bb -> 1}
]


-
Damn ... by 10 seconds :) –  belisarius is forth May 13 '12 at 18:58
@belisarius :-D –  R. M. May 13 '12 at 18:59
I have Manipulates per tabview at the moment and that causes a lot of sync problems. –  ndroock1 May 13 '12 at 19:03
@ndroock1 I don't quite understand what you mean by "manipulates per tabview" –  R. M. May 13 '12 at 19:04
@R.M - Like TabView[a->Manipulate[],b->Manipulate[],...] that works somewhat with an outer Manipulate but it is infact a workaround for the problem proposed in this question. –  ndroock1 May 13 '12 at 20:54