12-07-2010 09:24 PM
I'm trying to do something I thought the GridFieldManager would be tailor made for:
Name: [ EditField]
Phone: [EditField]
Using LabelFields (non-Focusable) in column 0 and EditFields (with no labels) in column 1.
I wanted everything in column 0 right justified with the ":" against the column 0-1 border and I wanted all of my EditFields to take up all of the width of column 1 with pretty little borders.
Something that would take me about 5 minutes for iPhone. (I say that because I get really, really pissed when I spend half a day doing something that is SO simple on other platforms.)
So my problems:
1) The EditField runs off the edge of column 1. This same field looks fine if I add it to the container VFM that holds the GridManager. No amount of mucking with column properties or overridding getPreferredWidth() etc. could fix this issue. I gave up and used some hack I found the BB website for creating fixed width/height EditFields. I emphasize *HACK because, really, how hard could it be to create a STANDARD EditField with a fixed width/height. Something many people would us.
I suspect there is a layout manager embedded in the cell that I can't seem to control.
2) Even though my LabelFields in column 0 are clearly Field.NON_FOCUSABLE (and work correctly when added to my container VFM instead of the GFM) they still accept focus. Again, I suspect there is some container these LabelFields are placed in that I cannot control that is focusable.
So my question iss: has anyone used GFM for anything other than simple tabular data? What am I missing? Am I wrong to be so pissed that when I write for BB, I spend SO MUCH **bleep** TIME on simple layout tasks???
12-07-2010 09:58 PM
Honestly, for any layout that is anything but basic... you're better off writing a custom layout manager.
12-08-2010 12:06 AM
That seems to be the common wisdom and I've resorted to that before.
(I wonder how many iPhone or Android apps there would be if developers had to do every basic layout task like this on those platforms...)
12-08-2010 06:26 AM
Well....
Let me know how those checkboxes, radio buttons and drop down fields work on iPhone... oh wait.
06-27-2011 01:18 PM
06-27-2011 01:54 PM
The GridFieldManager that is "built-in" to OS5 is useless. It was not implemented in certain versions of OS5 (such as earlier OS versions of the Bold 2).
If you download the GridFieldManager implementation files and add them to your project, then it can be useful. But, it still requires a fair bit of TLC as navigation movement is not well defined in it.
06-27-2011 01:57 PM
06-27-2011 02:03 PM
06-27-2011 02:11 PM
This looks promising, and very close to the way I have subclasses the stock GridFieldManager. Any idea how this would relate to the problem I stated above?
06-27-2011 02:29 PM - edited 06-27-2011 02:49 PM
@searingmedia
This works. How is it that a arranging screen elements in a grid would be this complicated. In other words why must a grid field be made from scratch?
Thank you