Author Topic: Scroll Liquid UI Table  (Read 3769 times)

Leo Chu

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 16
    • View Profile
Scroll Liquid UI Table
« on: June 20, 2017, 01:44:38 PM »
Liquid UI: Scroll Liquid UI Table

This example is to create the logic which scrolls Liquid UI table according to user input.
By changing the scroll position value of table object, to achieve table scrolling behavior.


Step 1: Create user interface
clearscreen();

//Logic to accept user input of scrolling and trigger the scrolling action
inputfield([1,2], "Scroll to Line:", [1,20], {"name":"z_scroll_to", "size":2, "numerical":true});
pushbutton([1,24], "Scroll", "?", {"process":scrollLUITable, "size":[1,10]});

//Logic to render Liquid UI table
table([3,2], [15,50], {"name":"z_table", "title":"BOM Detail", "rows":100});
column("Item", {"table":"z_table", "name":"item_no", "position":1, "size":4, "numerical":true});
column("Document", {"table":"z_table", "name":"doc_no", "position":2, "size":25, "uppercase":true});
column("Type", {"table":"z_table", "name":"doc_type", "position":3, "size":3, "uppercase":true});
column("Part", {"table":"z_table", "name":"doc_part", "position":4, "size":3, "uppercase":true});
column("Version", {"table":"z_table", "name":"doc_version", "position":5, "size":2, "uppercase":true});



Step 2: Create function to scroll
//Function to scroll Liquid UI table according to input
function scrollLUITable(){
   z_table.vscrollpos = parseInt(z_scroll_to);
}



See attachments for script example