DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Center Data in Table / Remove Scroll in SUD

Hello,

 

I have developed a simple .SUD file in which I have a table of data.  I was wondering if there is anyway to center or align right the data within the table?

 

Also I have repeatedly resized the table to remove the scrolling capability only to have it return when I click on the table when the program is running.

 

Any Idea on how to format a table that blocks the scroll capability?

 

I am using DIAdem 2012

 

Thanks

Tim
0 Kudos
Message 1 of 4
(5,523 Views)

Hi Tim,

 

The only way to achieve all of that is with the newer XTable control, which has "HorizontalScroll" and "VerticalScroll" properties.  You can also specify the text alignment if you select the "Columns" property and choose the cell control to be an edit box and click on the [...] button to pop up the cell edit box formatting options.

 

The static table control does not support scroll bar hiding.  The XTable is a little strange at first, but once you get used to it you won't got back to the older static table.

 

Brad Turpin

DIAdem Product support Engineer

National Instruments

0 Kudos
Message 2 of 4
(5,513 Views)

I am looking into using the Xtable now but have found it a little different the the static table.

 

For example when I wanted to set a static table cell I would simple reference it location and set the value

 

Table1.Cells(Row, Col).Value = SomeValue

 

With the XTable I am finding it difficult to do something as simple as set the Cell value

 

XTable1. ???? = SomeValue 

Tim
0 Kudos
Message 3 of 4
(5,498 Views)

Hi Tim,

 

I will defer to Brad's Expertise if there is any other information to be had, but XTable contents are controlled by events instead of a Tables variables. The way you modify and access data with the XTable is through EventValGet and EventValSet calls.

 

The main focus will be making a call similar to the following

 

EventValGet:

"Cell.Text = Data.GetChannel(Col).Name" once you set a row and col number and a referenced cell.

 

EventValSet:

Data.GetChannel(Col).Values(Row) = Val(Eval(Cell.Text))

 

There are some useful tutorials in the help files on using the XTable, or Extended Table as it is, that may be worth a look. Many of them are available on our website, such as this one:

 

http://zone.ni.com/reference/en-XX/help/370858K-01/procsud/procsud/procsud_xtable/

 

And for reference, here is some better API type documentation on the XTable and information about it.

 

http://zone.ni.com/reference/en-XX/help/370858K-01/sudref/objects/sud_objects_tovirtgridctrl/

 

Hopefully that will help get things moving, feel free to ask if you have any more questions.

 

Regards,

 

James W.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(5,484 Views)