I have a chart chart that I allow the user to select where they put the legend--top, left, right, bottom, via a popup menu.
This is a significant problem for me because there are laws for my software that there must be a legend.
It is very simple code.
Code: Select all
if miLegendLeft.Down then
chrtIncomeSources.Legend.Alignment := laLeft
else
if miLegendTop.Down then
chrtIncomeSources.Legend.Alignment := laTop
else
if miLegendRight.Down then
chrtIncomeSources.Legend.Alignment := laRight
else
begin
chrtIncomeSources.Legend.Alignment := laBottom;
if not miLegendBottom.Down then
miLegendBottom.Down := True;
end;
I reproduced it in a small example and have attached the code--right click over the chart and relocate the legend. When set to top or bottom, it does not display.
Ed Dressel