DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

XTable Cell Alignment Issues

Hello all:

 

I'm having an issue with my XTables.  I want my data to be center aligned within each cell, but "cell.Alignment=1" keeps returning the following error: "Object doesn't support this property or method: 'Cell.Alignment'."

 

The interesting thing is, however, that the header row for the columns (row 0) center aligns properly, without throwing an error.  Everything besides that remains left aligned.

 

I've attached a screenshot of my code.  Any assistance would be greatly appreciated!!!

 

 

Thanks,

Alex

0 Kudos
Message 1 of 13
(3,609 Views)
0 Kudos
Message 2 of 13
(3,606 Views)

gskylr:

 

Thanks for the response.  Looks like that would work for vertical alignment, but I'm looking to center the text horizontally within the cell.

 

Any thoughts?

 

 

Thanks,

Alex

0 Kudos
Message 3 of 13
(3,603 Views)

Is any of your columns not of "Text" type?  they could be ListBox or something else which does not support "Alignment" property?

 

0 Kudos
Message 4 of 13
(3,593 Views)

gsklyr:

 

No, they are all "Text" types- I'm putting values from channel properties as well as data from data channels into the cells.

 

I'm still stumped on this...

 

 

Thanks,

Alex

0 Kudos
Message 5 of 13
(3,565 Views)

The return value of the function Val() is of numeric type and you are assigning it ti a cell.text.  Could it be messing with things?  Maybe you need to convert it back to string

0 Kudos
Message 6 of 13
(3,562 Views)

Unfortunately, that is still throwing the same error.  Any more thoughts?

0 Kudos
Message 7 of 13
(3,546 Views)

At the top of your EventValGet put the line:

Call MsgBox(Cell.Alignment)

You will be able to see the order of execution and understand when exactly it fails 

0 Kudos
Message 8 of 13
(3,538 Views)

The issue appears to start right after inserting the column headers.

 

I have the following error: "Object doesnt support this property or method: 'Cell Alignment'."

 

It throws that error in the msgbox line that you suggested.

 

 

 

Thanks,

0 Kudos
Message 9 of 13
(3,525 Views)

Maybe it can't align something that is not populated?  looks like this function runs at initialization, how about using Alignment property only when cells have been initialized/populated?

0 Kudos
Message 10 of 13
(3,522 Views)