Change editor lay-out
To simplify a little the lives of my customers, I have the need to hide some buttons on the left toolbar in the designer of Fast Reports.
I did so in a way, using the ONShowStartupScreen frxdesigner's event, to make invisible buttons that I don't want to see (like the button for TeeChart graphics, one of the formulas etc.).
It initially works well, but when in the designer editor I change the page using tabs, fastreport redisplay all the buttons, there is a way to avoid this thing!
thank's
Lorenzo
I did so in a way, using the ONShowStartupScreen frxdesigner's event, to make invisible buttons that I don't want to see (like the button for TeeChart graphics, one of the formulas etc.).
It initially works well, but when in the designer editor I change the page using tabs, fastreport redisplay all the buttons, there is a way to avoid this thing!
thank's
Lorenzo
Comments
I don't know this way. Can you give more deatails
Simply I find the buttons I want to make invisible in the form designer, so I put the VISIBLE variable to false!
Since these buttons do not have a specific name as the program creates them runtime, I identify them by assigned imageindex properties.
The code is like this:
for I := 0 to Designer.ObjectsTB1.ComponentCount-1 do begin
if (Designer.ObjectsTB1.Components is TToolButton) then begin
TToolButton(Designer.ObjectsTB1.Components).hint:=IntToStr(TToolButton(Designer.ObjectsTB1.Components).ImageIndex);
if (TToolButton(Designer.ObjectsTB1.Components).ImageIndex in [25,32]) then
TToolButton(Designer.ObjectsTB1.Components).Visible:=False;//chart Tchart
end;
end;
Lorenzo
papas games