Dragging DBfield into designform
in designer, when I drag a DB field into the designer,
FR always creates a TfrxMemoView instance.
Is there a way to change this?
Depending on the field, I would like to create another class, in my case, some custom report component!
Thanks
FR always creates a TfrxMemoView instance.
Is there a way to change this?
Depending on the field, I would like to create another class, in my case, some custom report component!
Thanks
Comments
I've investigated a bit further:
drxDesgnWorkspace1.pas lines 275 ff.
How about sending an event here for creating a TfrxMemoView-descendant class
outside from this file? Would be very handy!
Thanks,
Daniel
you have 2 option choices at the bottom of which you can select either or both.
this pane is not used to add fields to existing memos, to do so select the memo
rclck select edit then clck the expression builder btn in expr builder select data tab
dblclick on field and select ok to leave expression builder, memo will then contain
data field with correct brackets.
but my problem lies slightly elsewhere
I have descendants from TfrxMemoView that basically override the way the datafield is formatted.
Example:
For example I have a TfrxTimeView which takes the datafield - a time of the day stored as number of seconds - and I override the GetData procedure to convert the data from the field (number of seconds - integer) into a displayable string ('hh:mm').
Now when I drag a database-field into the workspace, it would be nice to have a TfrxTimeView instance created, depending on the field-type....
My workaround is to have several custom components (on the OTHERS-buttongroup on the left side). When I create such a component, it asks for a field reference in a custom editor.... Works fine but you need to know which custom component matches which fieldtype....
The workaround runs fine, I just thought it might be easier to have some "component detection"-event while doing the drag/drop.
Hope that's understandable
Thanks,
Daniel
I will probably subclass the designer and add this functionality!
Thanks,
Daniel