Accessing Designer.ObjectsTB1
I have a routine that I use to hide unwanted control from the toolbuttons.
Example:
Works Ok, although I would have preferred to use the ClassName of some other property other than the Hint (suggestions welcome).
Question #1: What else can I use to figure out what class this is as they are all TToolButtons.
An other issue is when the user clicks on either the Code or Data tab (from the Page1 tab), the unwanted 'Copy Format Tool' control re-appears.
Question #2: How can I access the tab change event so I can call my routine again?
Custom Control
I created a custom control that my users can select when designing their reports. One of its properties is an enumerated type which gets displayed as a dropdown. So far so good. This property has a a "Get" and "Set" routine, when the user selects/changes the property the original value is used in the set routine (not the one I select). In fact, after trying to change a few more enumerated properties, none of them stick.
Question #3: What do I have to do to make the selected property change stick?
Richard
Example:
for i := 0 to Designer.ObjectsTB1.ButtonCount - 1 do
begin
  if ( CompareText( Designer.ObjectsTB1.Buttons[i].Hint, 'Copy Format Tool' ) = 0 ) then
      Designer.ObjectsTB1.Buttons[i].Visible := false;
  //...
end;
Works Ok, although I would have preferred to use the ClassName of some other property other than the Hint (suggestions welcome).
Question #1: What else can I use to figure out what class this is as they are all TToolButtons.
An other issue is when the user clicks on either the Code or Data tab (from the Page1 tab), the unwanted 'Copy Format Tool' control re-appears.
Question #2: How can I access the tab change event so I can call my routine again?
Custom Control
I created a custom control that my users can select when designing their reports. One of its properties is an enumerated type which gets displayed as a dropdown. So far so good. This property has a a "Get" and "Set" routine, when the user selects/changes the property the original value is used in the set routine (not the one I select). In fact, after trying to change a few more enumerated properties, none of them stick.
Question #3: What do I have to do to make the selected property change stick?
Richard
Comments