ここで何が間違っているのかわからない
//update controls from main form Tshape
form2.cbxShape.ItemIndex:= ord(Shape1.Shape);
form2.cbxColor.Selected:= Shape1.Brush.Color;
form2.cbxStyle.ItemIndex:= Ord(Shape1.Brush.Style);
if form2.ShowModal = mrOK then
begin
//update main form Tshape from controls
Shape1.Shape:= TShapeType(form2.cbxShape.ItemIndex);
Shape1.Brush.Color:= form2.cbxColor.Selected;
Shape1.Brush.Style:= TBrushStyle(form2.cbxStyle.ItemIndex);
end;
正しい形やブラシスタイルが得られません(色は正常に機能します)
リストボックスの項目は次のとおりです。
Circle
Ellipse
Rectangle
RoundRect
RoundSquare
Square
と
BDiagonal
Clear
Cross
DiagCross
FDiagonal
Horizontal
Solid