Subject | Re: Carriage returns in grid |
---|---|
Author | Joe |
Post date | 2011-04-27T21:18:03Z |
Oh duh! Nevermind. I didn't realize that AString had an initial value of the original text. I thought it was an output-only parameter.
-Joe
-Joe
--- In IBObjects@yahoogroups.com, "Joe" <joe@...> wrote:
>
> Jason,
>
> Thanks, I think OnGetDisplayText is exactly what I need.
>
> However, I'm not quite sure how to access the data that this event function points to with the ACol and ARow integer values. I could be missing it, but I don't see any methods or properties that accept integer values and return the text contained in the grid cells at those coordinates.
>
> If I have to get the data from the dataset, how do I get a pointer to the column in the dataset referenced by a certain row and column integer value?
>
> -Joe
>
> --- In IBObjects@yahoogroups.com, "Support List" <supportlist@> wrote:
> >
> > > I recently switched a TIBOQuery and TDBGrid to a TIB_Query and TIB_Grid.
> > > Using the old controls, if a string field contained a carriage return, it
> > > was displayed in the grid field as 2 vertical bars. With the new
> > > controls, only the first line is displayed.
> > >
> > > Example:
> > >
> > > With TIBOQuery and TDBGrid
> > > ==========================
> > > Markers||Black||4 Per Pack
> > >
> > > With TIB_Query and TIB_Grid
> > > ==========================
> > > Markers
> > >
> > > With the new components, I can only see the other 2 lines if I edit the
> > > contents and scroll.
> > >
> > > What setting do I need to change in my TIB_Query or TIB_Grid to get it to
> > > display all lines on a single line?
> >
> > I am not sure if I have any settings for this.
> >
> > What probably needs to happen is the painting routines need to do
> > single-line painting instead of memo or multi-line painting.
> >
> > For the time being, you might try making use of the event to customize the
> > display of text.
> >
> > You can replace the #13 and #10 characters with something else, like '#13'
> > and '#10'. Then, you will need to decode them as such.
> >
> > OnGetDisplayText
> > OnGetEditText
> > OnSetEditText
> >
> > I could add a new option to DrawCellTextOptions to automate this to some
> > extent. I'm open to suggestions if you think something would be helpful.
> > Rather than do the work in your app, you might try doing it inside the IBO
> > code and then submit it to me for acceptance.
> >
> > Thanks,
> > Jason
> >
>