Hello,
PixelLayout does not lack originality;
Not only does it resize the controls, but it also repositions the controls(My mistake).
Does anyone know how to make this control work as the documentation says? (A control for pixel position)
class Test : Form
{
Label label;
PixelLayout layout;
int Y;
public Test ()
{
Padding = new (0, 0);
Height = 400; Width = 200;
label = new Label { Height = 400, Width = 200, BackgroundColor = Colors.LightGrey, Text = ABC () };
layout = new PixelLayout { Height = 400, Width = 200, BackgroundColor = Colors.LightCoral };
layout.Add (label, 0, -200);
Content = layout;
static string ABC () {
var s = "";
foreach (var c in "abcdefghijklmnopkrstuvwxy") s += c + "\n";
return s;
}
}
protected override void OnMouseWheel(MouseEventArgs e)
{
Y += (int)e.Delta.Height * 20;
layout.Move (label, 0, Y);
base.OnMouseWheel(e);
}
}
jmv