Re: EuGrid cell alignment?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Greg,

The EGW_CELLFORMAT message is sent for all visible cells - including row and
column headers.

column headers have a row number of 0.
row headers have a column_id of 0.

If you just want to format the data cells, then you need to exclude the above.

Probably something like:

if msg=EGW_CELLFORMAT then
   -- Get row
   row = EGW_GetCellProperty(self, wParam, EGW_CELL_ROW)
   -- Get column id
   col_id= EGW_GetCellProperty(self, wParam, EGW_CELL_COL_ID)

   if row>0 and col>0 then
      ...format cell



Tony Steward wrote:
> 
> Hi Greg,
> Post your event code. 
> 
> In EGW_CELLFORMAT are you checking that you are beyond row 0.
> 
> Regards
> Tony
> 
> 
> On Wed, 16 Feb 2005 21:07:15 -0500, Greg Haberek <ghaberek at gmail.com>
> wrote:
> > 
> > To: Phil Russell
> > 
> > Ok, I have an app that uses a EuGrid. I want the column headers to be
> > center aligned, and the cells to be right aligned. When I create the
> > Grid, I set EGW_COL_ALIGN to EGW_CENTER for each new column. Then when
> > I recieve a EGW_CELLFORMAT message, I set EGW_CELL_ALIGN to EGW_RIGHT.
> > But, when I do this, the Column headers get set to EGW_RIGHT, too!!
> > Why? I don't want this.
> > 
> > ~Greg
> > 
> > 
> -- 
> Regards
> Tony Steward
> www.locksdownunder.com
> 
> IF IT IS TO BE IT IS UP TO ME!
> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu