ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
position of a table cell in a gui
Hello,
I am building a gui and this gui has table panel. I have add the functionality to open a combobox when I click on a cell in a certain column. When the table gets to long for the table panel, scroll bars will appear on the side of the table. How do I get the actual y position of a selected cell in the table, when I have scrolled? for example: based on the row height I know that y position of a cell in the sixed row, but when I have scrolled the table, the sixed row could actually be positioned at the y position of the forth row. In this case I would not want my combo box to be shown at the acual y position of the sixed row, but at the y position of the fourth row. I hope someone can help me. Esther |
#2
|
||||
|
||||
You can use the scrollinfo() command to get how many pixels the table has been scrolled. You can then use that value to calculate where the clicked cell is.
scrollinfo(node("/TheTable",c),0,1,4) will tell you how many pixels down you have scrolled. |
The Following 5 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Steven Hamoen (04-15-2010) |
Thread | Thread Starter | Forum | Replies | Last Post |
Set datatype of a table cell | Nico Zahn | Q&A | 7 | 11-28-2008 11:34 AM |
How to change the location of items in a rack cell from y to x direction? | Tom David | Q&A | 3 | 11-23-2008 10:52 AM |
Placing item in respective cell of a rack | David Chan | Q&A | 1 | 11-13-2008 09:32 AM |
Cell Control in a Rack | Gavin Douglas | Q&A | 2 | 10-22-2008 09:16 AM |
Can I make a column of a global table to type table? | qin tian | Q&A | 0 | 10-01-2008 09:27 PM |