ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 04-14-2010
Esther Bennett Esther Bennett is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 115
Downloads: 27
Uploads: 0
Thanks: 103
Thanked 116 Times in 50 Posts
Rep Power: 271
Esther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to all
Default 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  
Old 04-14-2010
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.