How to scroll PyGTK ScrolledWindow to a certain row of a nested table? - pygtk

I have a program in PyGTK which has a ScrolledWindow and a Table nested in it. The table rows can be of a different height. What I'm trying to find is a way to scroll the view so it begins from the selected row. I know how to move the scrollbar to a certain position using the scrolled_window.get_vadjustment().set_value(), but I do not know how to find the scroll position of the table rows.
Alternatively, maybe I'm using wrong widget and someone can point me to the right one? I'm trying to achieve the following behaviour: the screen shows the rows of a table, the top row is the currently selected object, when the user presses up or down buttons, the whole table scrolls down or up, so the previous or the next row becomes the top row.

Nevermind, I found a solution: you have to use the child widget get_allocation() function, which returns the bounding rectangle of a child widget relative to the scrolledwindow, so child.get_allocation().y is the answer to my own question.

Related

How can I get my Picker to vertically align in React Native?

I have created a Snack here:
https://snack.expo.io/#deltanovember/dtest
using the libraries react-native-easy-grid and native-base.
I've created a basic table which appears as follows:
The far right column isn't properly vertically aligned because Score1 appears slightly above the rest of the row, whereas Score5 appears slightly below the rest of the row.
How do I get the far right column aligned with the rest of the table?
The columns as a whole are vertically aligned. You should render row by row, because the data inside a row belongs together and the content of each column is not necessarily related to each other.
I've updated your code and created a snack. Check this out: https://snack.expo.io/#mukeyii/grid-vertical-alignment

RDLC - How to display each row from dataset in each page?

I am having set of text boxes in the report and binding each columns in the text box from the Data set.
As of now only first record from the dataset is binding in the text box.
I need all the rows in the dataset to bind in the text boxes page wise.
Each row in the dataset bind to text boxes page wise.
First record in first page,Second record in second page ... etc.
How to achieve this? Help me to solve this...
Thanks in Advance,
Stephen.L
I recently faced the same issue, I used some help from stackoverflow to solve the issue, u might have already figured it out but this is to help others with similar issue.
Make sure you have a Dataset defined for your report.
Add a "Table" control to the report. This seems to be needed in order to iterate the rows in your Dataset.
Delete the header row and two of the default columns from the table so that you are left with a single row with a single column.
Expand the table to the width of your layout and make it as tall as you will need for your "free form" layout.
By default, there is a TextBox inside the table cell. Right-click the empty table cell and choose "delete" to remove that TextBox.
Drag a "Rectangle" control into the empty table cell. It seems to automatically "dock" to the width/height of the table cell.
Now you should be able to drag the fields from your DataSet (TextBoxes, etc) into the Rectangle to produce the desired layout.
You can use a List with page breaks at the end of details group.

listview items centered but left aligned when selected

I have a listview with a single column with values centered down every row. I'm just trying to find out what's causing the entries to get pushed to the left of the column everytime one of the entries is selected with a mouse or keyboard.
Thanks!

objective c get first row in uitableview

how do i determine the top row in my uitableview that is currently visible? The table has 200+ rows so when a row is clicked i want to determine the first row number that is currently visible. The idea is that when i go to a detail view page for the table item and come back to the page i can scroll my table exactly to that row ( also my table is all in 1 section if that helps) any help much appreciated
UITableView has a visibleCells method. Check out the documentation. If it's more useful to you, there's also indexPathsForVisibleRows.

How would you make a text cell in a an Outline View show how many children the parent row has?

How would you make Rows that are the Top Parent in an Outline View (which is connected to a NSTreeController) display how many children it has in a Text Cell?
If this is a bit confusing here is a Picture of what I mean.
(source: sourceforge.net)
I am talking about the number to the right of one of the rows in the circle, which is displaying how many children the parent has.
You can either make a custom NSCell subclass that will show the child count (you would use your model object itself as the cell's object value, instead of providing a separate string or image), or in your data source method for the outline view you could just include the count along with the title string. Of course, you'll have to use the first option if you want it drawn exactly like the screenshot.
Custom cell, either on that column or on a second column.