Author Topic: Right Justify a column?  (Read 3887 times)


  • Newbie
  • *
  • Posts: 6
Right Justify a column?
« on: January 25, 2012, 02:03:33 pm »
Is there a way to right-justify one or more columns of grid? I have some numeric columns which look pretty tacky left-justfied.

I tried EG_SETCOLUMFORMAT  using "###0"  but that did not work... or maybe it did by suppressing non-significant digits (that is, the same behavior as before.

The way the application works, I can do it after I load it if I have to do it cell by cell.

E- Grid 3.62


Brian Chirgwin

  • Administrator
  • Newbie
  • *****
  • Posts: 32
Re: Right Justify a column?
« Reply #1 on: January 25, 2012, 08:59:50 pm »
Check out

%EG_SETCOLUMNFONTHORZALIGN for an entire column  (Except cells with cell specific settings)
%EG_SETHORZALIGN for individual cells (Cell Specific settings must be set)

FontStyle& = SendMessage(Hgrid&, %EG_SETCOLUMNFONTHORZALIGN, ColumnNumber&, %TA_RIGHT)

Brian Chirgwin