Problem with Planogrammer

Hi, I have a problem with the planogrammer sample. I select two or more items that are in diferent racks, when I move them with the keys they do a bad move.

Other question is, How can I show in the goView, dot lines showing the paper size?

Thanks in advance.

For the first question: Do you mean when the user uses the arrow keys to move the selected items? When the user drags multiple items, they all go into the Rack or Shelf that the mouse pointer is in. That policy decision was needed to avoid ambiguities and a lot of complications.

For the second question: Do you want to have a dotted line along the edge inside the margins? If so, you could create a GoRectangle, set its Pen to what you want, set its Bounds to the GoView.Sheet.MarginBounds, and then Add it to the GoView.Sheet.
This assumes that the size (in document coordinates) of the GoView.Sheet and the GoView.Sheet.TopLeftMargin and .BottomRightMargin are not going to change. If they do change dynamically, you'll need to update the Bounds of your extra GoRectangle yourself, preferably in an override of GoSheet.LayoutChildren.
Also, if you don't want to show the margins with the GoSheet.MarginColor, you can set GoSheet.ShowsMargins to false.

For the first question: I’m doing a flow chart with columns. I’m using the racks for the columns. How can I move the objects like I want or I have not to use the racks?

For the second question: Thanks! I will try that.


I’m sorry, but regarding the first question, I still don’t understand what behavior you want.

I want to select various items that are in different racks and move them, with the arrow keys and with the mouse. But I don’t want that they moves to the rack that the mouse point to, I want to they moves and stays in the same rack they were.

Hmmm, although that behavior is technically not a bug, since it is documented, I don’t think that is what it should do when the selection is being moved not by GoToolDragging but by GoToolManager which is handling the arrow keys.

Could you try overriding GoGrid.CanSnapPoint for the grid that you are using, to include the following definition. Of course if you are using the implementations of Shelf or Rack from Planogrammer, you can just merge this code with the existing overrides of ShelfGrid or RackGrid.CanSnapPoint, presumably by adding the not-is-an-Item check to the beginning of this method.
[code] public override bool CanSnapPoint(PointF p, GoObject obj, GoView view) {
if (!CanView())
return false;
if (view != null) {
if (obj == this || IsChildOf(obj))
return false;
GoViewSnapStyle snapstyle;
if (view.Tool is GoToolResizing) {
snapstyle = this.SnapResize;
} else {
snapstyle = this.SnapDrag;
switch (snapstyle) {
case GoViewSnapStyle.None:
return false;
case GoViewSnapStyle.Jump:
case GoViewSnapStyle.After:
if (view.LastInput.InputState != GoInputState.Finish)
return false;
if (view.Selection.Contains(this))
return false;
RectangleF infRect = this.Extent;
if (view != null && (view.Tool is GoToolResizing || view.Tool is GoToolDragging))
return ContainsRect(infRect, view.LastInput.DocPoint);
return ContainsRect(infRect, p);
By the way, if you haven't already set them, you may want to set the values of the GoView.ArrowMoveLarge and .ArrowMoveSmall properties.