BlackBerry ListField Height Not Changing - blackberry

In the ListField,If i click on selected index or focus on the selected index,i want to chane the height of the selected field automatically....
Can u help how to implement that ....
Advance thanks..

A ListField can only have uniform row sizes, so unfortunately it won't be something as simple as changing the height of the selected row. If you're wanting it to be able to change sizes, you'll probably need to write your own. It wouldn't be too terribly difficult by just adding fields to a VerticalFieldManagerand making that scrollable, though you will need to handle selection painting, row indexing, etc.

A ListField can only have uniform row sizes... but if you use horizontalFieldManager for the list row. you can change the size on TouchEvent by setting height of the horizontalFieldManager

Related

ObjectChoiceField modifies either screen height or scroll

I have two choices, one of them set Choices to another one when I select an option.
When I select an option, I calling in fieldChanged method a function that set new options to another ObjectChoiceField depending the selected option.
The problem is that the scroll decreases its height or the screen loses height and some fields at the bottom are hidden.
Please, any idea?
Thanks in advance.

UITextView or something else? need help in understanding

i'm writing a small app to train myself and i need a little help.
can anyone give me an advice how to make this construction like on the picture bellow?
i'm interested about "Description" section. i want to make the similar thing in my app. some text in preview..button "more" and when i click it the whole text will appear on the screen. also i want to have the same button "hide" that returned me to the preview.
i need UITextView or smth else?
rmaddy is right, UILabel is the way to go.
You need to hide the More button, and show a Hide (or Less?) button and the label when the user taps. You also need to change the row's height to accomodate for the new content.
To find the appropriate height for the table's row, use either [UILabel sizeToFit] or [UILabel sizeThatFits].
To animate the height change of the row, have a look at Can you animate a height change on a UITableViewCell when selected?

How to make a selection over a large area of cells in virtualtreeview?

I am using TVirtualTreeView as an excellent alternative to the old TStringgrid.
On one feature that I am missing though, is the possibility to make selections of an any area of cells (other than a single column, row or the whole area).
I can not find any solution to this, does anyone have a suggestion?
You Can Use Canvas Draw For Show Own Selection Area of Cell.

Delphi Devexpress TcxGrid Scroll Events

I am using the cxGrid component with a TcxGridTableView. I need to get the offset distance of the scroll bar. I wonder there are scroll events that I can use to get this information?
I'm looking for how much pixels were scrolled because I want to display something like a rule of pixels from the left position of the grid above it, and i have to count the pixels "hidden", shifted by the scroll.
Thanks in advance.
I believe the grid has some sort of index property that specifies the rownumber of the top visible row in the grid. This property can be read and set. Is that what you are looking for?

Problem with horizontal scrolling on TStringGrid [duplicate]

I have a DBGrid on a form. The DBGrid has many columns, so an horizontal scroller is displayed. I scroll the DBGrid view to the right to see more columns. If I select a row, the DBGrid view is automatically reset to view the first column (As if I scroll back to the left most position).
Is there a way to prevent that?
I assume you have goRowSelect in the grid options. This forces the selected col to be the first non-fixed column, so whenever the row changes the code to scroll the selected cell into view forces the first non-fixed column to be visible.
Since goRowSelect also effectively disables the horizontal scrolling with the keyboard I try to live without it. You can use custom drawing of the grid cells to show all cells of the current row with the proper colours for selected cells, even though only one cell is really selected. I use this also to show different colours depending on whether the grid is focused or not, similar to what a standard tree control does. For this to work properly you do however need to handle not only grid cell navigation events, but some other events too, like OnEnter and OnExit of the grid, OnActivate and OnDeactivate of the Application, and so on.
You might be able to ask for the scrollbar position
GetScrollInfo(Self.Handle, SB_VERT, SIOld);
and use SetScrollInfo( ) to put it back. There's probably a better way. SelectedField is another way (get/set it as needed).

Resources