Page 1 of 1

Database-Driven Subfile Formatting

Posted: Wed Aug 18, 2010 2:18 pm
by RussCraig
Hi All,

I've been working on a program recently that uses a database-driven subfile, mainly due to the fact that the subfile can contain more than 9999 records. I would've used a page-at-a-time subfile if I didn't need to export the entire subfile to CSV. So what I do is copy the needed records into a temporary work file that's externally described, and I have the subfile reading from the work file. This is working great.

Is there any way to control the formatting of the columns, such as left/right justify? If I had dynamic output fields, I could justify those individually and it works fine, but I can't edit any column formatting in a database-driven subfile. I can set the entire grid's justification, but not individual colums. I need some left-justified and some right-justified. Is there any way to accomplish this aside from redoing my workfile to be entirely text fields so I can justify them through code?

Thanks,
-RC

Re: Database-Driven Subfile Formatting

Posted: Wed Aug 18, 2010 3:24 pm
by Alex
To specify a different alignment option for each grid column, find the grid's "text align" property, then select "Other..." from the drop-down and type something like this:

left,right,center,left

Most font/text/alignment properties on the grid widget will allow you to specify either one value for all columns or a comma separated list of values.

Re: Database-Driven Subfile Formatting

Posted: Wed Aug 18, 2010 3:28 pm
by RussCraig
Thanks Alex, that's exactly what I was looking for!

-edit: Now I really feel silly. If I had bothered to read the description of the 'text align' property, I would've seen that it accepts a comma-separated list. Sorry about that :-P