EOlsen Posted April 29, 2014 Share Posted April 29, 2014 When working with a table component is there a variable or a function call that will indicate which array values in a large, scrolling table are currently being displayed? Any way to get a column in a table to display integer values in hex format? For example instead of seeing 14 you would see 0x0E displayed in a table cell. Link to comment Share on other sites More sharing options...
AzeoTech Posted April 29, 2014 Share Posted April 29, 2014 I do not believe so, but if you want to make a request, its something we could add pretty easily. As for displaying as hex, you'd have to create a separate string array to hold the hex representation, then use Format() with %x or %X to convert your integer into hex format. If you want the preceeding 0 (i.e. 14 shows as 0E not E), do: format("0x%02X", myValue) Note that x vs X is simply whether the hex letters show up lower or upper case. Link to comment Share on other sites More sharing options...
EOlsen Posted May 20, 2014 Author Share Posted May 20, 2014 Is it possible to display two dimensional array data in a table? For example, suppose you read a bunch of lines of data from an ascii log file, and while reading the file you parse each line to separate the data into individual fields and append this parsed array to a global data array. The code would be something like global string data private string fields private string instr = File.Read(h, 0) while (instr != "") fields = Parse(instr, -1, ",") data.Append(fields) instr = File.Read(h, 0) endwhile Now you want to display the data array in a table. What would the expression have to be for each column in the table in order to display field[0] in the first column, field[1] in the second column, etc. of the data as it was parsed? Tried expressions like data[][0], data[][1], etc. but haven't found the right expressions. Link to comment Share on other sites More sharing options...
AzeoTech Posted May 20, 2014 Share Posted May 20, 2014 First, consider ReadDelim() instead of creating a loop. It'll be much faster. Second, you were close. To get each column in the array you do: data[][0], data[][1] etc. but a table component expects its data in the rows dimension, so you have to wrap that with transpose(): transpose(data[][0],0) etc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.