Grid like arrangements in UIScrollView(PhotoScroller)
Hi all,
I was using apple's scrollview sample code (PhotoScroller - https://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/I ntro.html) for my app using numerous images (and by recycling logic) in UIScrollView. I implemented that in my app and it works fine.
Now Im working in an app similar to the above, but with the difference, loading images in grid like view. When I happen to use the same sample code, every thing works fine except the recycling logic.
I think there is some problem with my frame set which don't tell the xcode, the visible region.
Please some one temme how to set the visible set for the grid View structure for scrollview? The code I use is,
Quote:
CGRect visibleBounds = _scrollView.bounds;
// CGRect gridElementvisibleBounds = CGRectMake(0, 0, 212, 200);
int firstNeededPageIndex = floorf(CGRectGetMinX(visibleBounds) - CGRectGetWidth(visibleBounds));
int lastNeededPageIndex = floorf((CGRectGetMaxX(visibleBounds)-1) - CGRectGetWidth(visibleBounds));
firstNeededPageIndex = MAX(firstNeededPageIndex, 0);
lastNeededPageIndex = MIN(lastNeededPageIndex, [self imageCount] - 1);
where _scrollView is the UIScrollView instance that I use and the gridElement that I use is of frame size (0, 0, 212, 200). The number of grid elements that occupy the scrollView bounds is
3 x 3 (9).
Please some one help me finding out the thing that I should correct in the above code.
If Zach's answer doesn't correct the problem, consider filing a complaint with the Better Business Bureau and the consumer affairs department of your state's attorney general's office. After I got the run around for being billed for services I cancelled before they were installed and got nowhere with Comcast Customer Service, I filed complaints with the two agencies listed above. Surprisingly, I got not one, but TWO phone calls from Comcast's Executive Management something or other in Philly within 48 hours of filing the complaints. My bill was corrected within 24 hours. The last person I spoke with told me I was owed a refund after I cancelled the remaining service I had with them over the fiasco. If I don't get that refund within 30 days, I will file another complaint. The ony way Comcast is going to change their business practices is if customers continue to file legitimate complaints with the BBB and states' attorney generals' offices over their practices. Eventually, it will be so costly to pay people to answer these complaints and Comcast will decide its better for their bottom line to simply provide better customer service. File a complaint today.
Similar Messages
-
HI. I would like to arrange over 30 pictures into one grid-like ARRANGEMENT. (meaning above, below, left, right, of each other and so forth to form a rectangle)
Please help...thxYou messaged me that the contact sheet look is what want but w/o spaces.
One method is to actually start with the PSE contact sheet tool. I assume your version has it (mine is PSE 2). Maybe your version has an option to remove spaces; mine doesn't. In this example I created a sheet of 4 rows and 3 columns, with the option to not flatten the layers. Each picture appears on a separate layer.
On each row I moved the left and right pics inward to remove the spaces between the pics:
Activate the Move tool. Click on the left pic and use the arrow keys to move it inward. Same with the right pic.
Now to remove the spaces between the rows. To make this easier. lock together the pics on each row. Here I locked the pics on the top row, then used the arrow keys to move the row as a unit downward. An alternative method would be to merge the 3 pics on each row and move that merged layer. Do the same for the remaining rows.
This method works of course if the pictures are all the same size and all aligned vertical or horizontal.
If you don't want to use the contact sheet tool (e.g., if the pics are different sizes or alignment) you can do this:
Create a blank canvas.
Open a picture, select it (Select > All) and copy to the clipboard (Edit > Copy).
Activate the blank canvas and Edit > Paste. The picture will be placed on its own layer.
Do the same with the remaining pics and use the Move tool with mouse and/or arrow keys to position them where you want.
The advantage of the first method is that the rows and columns are precisely aligned. Using the mouse to align the pictures could be a little tricky. -
Previously, I posted a problem with trying to wrap tables within tables, referencing this code.
<!-- ... -->
<tableLayout>
<contents>
<rowLayout>
<contents>
<bc4j:viewObjectScope name="CustomArrayDataGraphsView">
<bc4j:rowStamp>
<cellFormat>
<contents>
<tableLayout>
<contents>
<rowLayout>
<contents>
<link
styleClass="OraHeaderSub"
targetFrame="display">
<boundAttribute
name="text">
<bc4j:attrValue name="AnalysisParam"/>
</boundAttribute>
<boundAttribute
name="destination">
<bc4j:ordProperty name="url"/>
</boundAttribute>
<boundAttribute
name="shortDesc">
<bc4j:attrValue name="Description"/>
</boundAttribute>
</link>
</contents>
</rowLayout>
<rowLayout>
<contents>
<bc4j:attrScope name="Graph">
<contents>
<html:object
width="300"
height="200">
<boundAttribute
name="data">
<bc4j:ordProperty name="url"/>
</boundAttribute>
<boundAttribute
name="type">
<bc4j:ordProperty name="contentType"/>
</boundAttribute>
<rawText>
<boundAttribute
name="text">
<bc4j:attrValue name="Description"/>
</boundAttribute>
</rawText>
</html:object>
</contents>
</bc4j:attrScope>
</contents>
</rowLayout>
</contents>
</tableLayout>
</contents>
</cellFormat>
</bc4j:rowStamp>
</bc4j:viewObjectScope>
</contents>
</rowLayout>
</contents>
</tableLayout>
<!-- ... -->The above code renders a single row of elements which are tables themselves. Using the <cellFormat> inside the <viewObjectScope> avoids the "new line" rendering of the internal tables of title/images. However, the internal tables do not wrap.
This is an unfortunate side-effect of html tables. So, I need to basically make a sizeable grid (similarly to a GridLayout for all you AWT/Swing folks out there) layout that can render a specified number of columns per table, creating new rows as necessary. Something like...
<gridLayout columns="5">
<contents>
<bc4j:viewObjectScope name="CustomArrayDataGraphsView">
<bc4j:rowStamp>
<cellFormat>
<contents>
<!-- render something per row -->
</contents>
</cellFormat>
</bc4j:rowStamp>
</bc4j:viewObjectScope>
</contents>
</gridLayout>This custom layout will render a maximum of five columns of data per table row, where each column is actually a row of information from the view object.
Is this possible using UIX components or should I start coding?
Thanks,
joeAlso, displaying a bunch of "inline"ed tables would be really useful. I can't seem to do this from within a <header>, <hideShowHeader> tag, even with explicitly coding:
<bc4j:viewObjectScope name="CustomArrayDataGraphsView">
<bc4j:rowStamp>
<bc4j:attrScope name="Graph">
<contents>
<html:table style="display: inline">
<html:tr>
<html:td>
<styledText text="Title"/>
</html:td>
</html:tr>
<html:tr>
<html:td>
<styledText text="Image"/>
</html:td>
</html:tr>
</html:table>
<!--
<tableLayout styleClass="display: inline" width="300">
<contents>
<rowLayout>
<contents>
<styledText text="Title"/>
</contents>
</rowLayout>
<rowLayout>
<contents>
<styledText text="Image"/>
</contents>
</rowLayout>
</contents>
</tableLayout>
</contents>
</bc4j:attrScope>
</bc4j:rowStamp>
<!-- render a "No Records Found" message -->
<contents>
<styledText
text="No Records Found"
styleClass="OraErrorText">
<boundAttribute
name="rendered">
<if>
<comparison
type="lessThan">
<bc4j:viewObjectProperty name="estimatedRowCount"/>
<fixed
javaType="int">1</fixed>
</comparison>
<fixed
javaType="boolean">true</fixed>
<fixed
javaType="boolean">false</fixed>
</if>
</boundAttribute>
</styledText>
</contents>
</bc4j:viewObjectScope>Apparently, the header tags do something which effects the display of "inline"ed elements, like the tables in the previous example. Any suggestions? I know taking out of the header works great, but, the <hideShowHeader> functionality is particularly necessary.
I have a time constraint on this... gotta be done by today, so if you have any other later minute suggestions besides creating a grid-like layout, let me know!
Thanks,
Joe -
does any body fimilar or made any grid like structure in jsp
Possibly the most useful client-side grid I have seen is the EBA Grid. It's entirely DHTML/JavaScript and has server-side code for JSP, ASP, and PHP. It does asynchronous paging and some other interesting stuff: http://www.aspgrids.com.
-
I am getting a grid like pattern over solid colors durring a disolve
I recently upgraded to Studio. When a sequence dissolves, especially to white, I am seeing a grid like pattern. I have also noticed this pattern in shots where there is a solid color in one location for a period of time. Any ideas?
G5 Mac OS X (10.4.9)Check your view options in the canvas or viewer pulldown menu (little radio button looks like a pill in the top center-right or either window.) Sounds like you have your background set to checkerboard 1 or 2. That grid is telling you there is nothing to be seen here. Set it to black if you want it black. This won't take away the fact that there is transparency mind you, it just shows transparency as black. You can choose white, as well.
-
Its possible to create a grid like this?!?!?
hello to all, im new in Mii and i have a sql statement to populate the table but i want to know if it is possible to create a grid like the image in this link :
http://img17.imageshack.us/img17/3021/gridx.jpg
and then put the information that comes from the sql in the blank spaces
regards and thanks for the help in advance
Máriohello, correct me if i say something wrong of yours steps:
1) Create a Doc action block with three columns like: Shift,Quantity,Scrap......
and then i put another field Total....correct?!?! or not?
2) Add SQLQuery Action block and configure it with already created SQL Query.
the result of my SQLQuery comes like this...
Yield Scrap
5000 1100
this is the result of this query:
select sum(max(yieldqty)), sum(max(scrapqty))
from z_event
where linenumber= '[Param.1]' and shiftnumber = '[Param.2]'
and (eventtimestamp >= to_date('[Param.3] 00:00:00', 'dd.mm.YYYY hh24:mi:ss'))
and (eventtimestamp <= to_date('[Param.4]', 'dd.mm.YYYY hh24:mi:ss'))
group by ordernumber
its better that the shiftnumber comes to???if yes the result comes like this:
Yield Scrap ShiftNumber
3720 35 1
30878 117 1
3) Put a repeater action block below that and configre with XPATH.
4)Add a Row action block,configure with Doc.output and map the each column from the repeater.
5) Also add other row with the total and take the sum of the quantity and scrap.
how to make the SUM?!?! There isnt SUM Function...
like this Total = Total + Repeater_0.Output{/Row/MAX_YIELDQTY_} ???
regards and sorry for all this questions
matinha -
How to create function code for field in GRID like list box in screen
Hi all,
I have requirement like drop down is created for field1 in GRID,
and have given f4 help for it, as soon as i change the data in the field
event has to trigger to update thevalues in other field.
This scenario i worked on screens where field is created with listbox and assign function code to it
when the field value changes the event triggers .
Is there is anything like that which will fire the event for field value changes.
can i update anything through the fieldcatalogue.
anybody help me on this
Regards,
MadhaviHi Madhavi,
yes we can do that by registering edit events..
check the below example.. has both the variants dropdown/f4 hlp...
screen flow logic
PROCESS BEFORE OUTPUT.
MODULE pbo.
PROCESS AFTER INPUT.
MODULE pai AT EXIT-COMMAND.
program
* CLASS lcl_event_responder DEFINITION *
CLASS lcl_event_responder DEFINITION.
PUBLIC SECTION.
DATA : ls_changed_cell TYPE lvc_s_modi,
lv_language TYPE spras..
METHODS refresh_changed_data FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed
e_ucomm.
ENDCLASS. "event_responder DEFINITION
DATA: go_handler TYPE REF TO lcl_event_responder,
go_container TYPE REF TO cl_gui_custom_container,
go_grid TYPE REF TO cl_gui_alv_grid,
gt_fieldcat TYPE lvc_t_fcat,
gv_language TYPE spras VALUE 'E',
gt_outtab TYPE TABLE OF makt WITH HEADER LINE.
PARAMETERS : dropdown TYPE char01 RADIOBUTTON GROUP grp,
f4help TYPE char01 RADIOBUTTON GROUP grp.
START-OF-SELECTION.
CALL SCREEN 100.
END-OF-SELECTION.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'BASIC'.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
SET SCREEN 0. LEAVE SCREEN.
ENDMODULE. "pai INPUT
FORM create_and_init_alv CHANGING pt_outtab LIKE gt_outtab[]
pt_fieldcat TYPE lvc_t_fcat.
CHECK go_container IS NOT BOUND.
CREATE OBJECT go_container
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_container.
PERFORM build_display_table.
PERFORM build_fieldcat CHANGING pt_fieldcat.
IF dropdown EQ abap_true.
PERFORM set_drdn_table.
ENDIF.
go_grid->set_table_for_first_display( CHANGING it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab ).
go_grid->set_ready_for_input( 1 ).
" raises the 'data_changed' event when we select another cell/any action after changing the data
go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ).
CREATE OBJECT go_handler.
SET HANDLER go_handler->refresh_changed_data FOR go_grid.
ENDFORM. "CREATE_AND_INIT_ALV
FORM build_display_table.
FREE gt_outtab.
SELECT * FROM makt UP TO 20 ROWS INTO TABLE gt_outtab WHERE spras EQ gv_language.
ENDFORM. "build_display_table
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'MAKT'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
IF ls_fcat-fieldname EQ 'SPRAS'.
ls_fcat-edit = abap_true..
ls_fcat-outputlen = 8.
IF dropdown EQ abap_true.
ls_fcat-drdn_hndl = '1'.
ls_fcat-checktable = '!'. "do not check foreign keys
ENDIF.
MODIFY pt_fieldcat FROM ls_fcat.
ENDIF.
ENDLOOP.
ENDFORM. "build_fieldcat
FORM set_drdn_table.
CHECK go_grid->offline( ) IS INITIAL.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'EN'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'DE'.
APPEND ls_dropdown TO lt_dropdown.
CALL METHOD go_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
ENDFORM. " set_drdn_table
FORM change_display_table USING pv_language pv_rowno TYPE i.
READ TABLE gt_outtab INDEX pv_rowno.
SELECT SINGLE * FROM makt INTO gt_outtab WHERE matnr = gt_outtab-matnr AND spras = pv_language.
IF sy-subrc EQ 0.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ELSE.
CLEAR : gt_outtab-maktx,
gt_outtab-maktg.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ENDIF.
ENDFORM. "change_display_table
* CLASS event_responder IMPLEMENTATION *
CLASS lcl_event_responder IMPLEMENTATION.
METHOD refresh_changed_data.
READ TABLE er_data_changed->mt_mod_cells INTO ls_changed_cell INDEX 1.
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
EXPORTING
input = ls_changed_cell-value
IMPORTING
output = lv_language.
PERFORM change_display_table USING lv_language ls_changed_cell-row_id.
go_grid->refresh_table_display( ).
ENDMETHOD. "click
ENDCLASS. "event_responder IMPLEMENTATION
Cheers,
Jose. -
When editing flex I would like to see the vertical lines of the background of the arrangement better.
I cannot change this, can I?Hi
Nope, but you may find things easier to use the Track Editor pane
CCT -
Cs5 - images have weird grid-like/pixelation distortion i cant get rid of! help!
i've just downloaded the trial of photoshop cs5 (it took ages mind you!) and when i go to open (or create) a file that is larger (eg 1000x750 pixels) there is this weird grid that distorts the image (it's not the grid you can turn off and on or the grid that shows the actual pixels). when i open a smaller file there is no grid and the image is perfectly clear and normal - but when i zoom out there is a grid. also, when i'm zoomed out (eg 66% but sometimes from even 200%) the distortion happens, whereas if i zoom closer it disappears.
it doesn't distort the image itself, but distorts the colours in parts of the image.
i've experimented enlarging the canvas of a smaller image and placing a larger image into it on a different layer, but then the grid affects not only the larger image but the smaller as well, like it is stretching the colours to the edge of the canvas, or trying to pixelate/fuzz the image. however the grid doesn't affect the whole canvas, just the bits above and to the side of the larger images (mostly).
also when i zoom in/out gradually the squares of the grid enlarge and change size (both bigger and smaller).
so i don't know what the problem is, and any help/suggestions would be much appreciated as i need to use the program for a uni assignment due in a couple of weeks!!
thanks!Hey- I have the same issue. When I started using cs5 I noticed this grid/distortion right away. At first I thought it was my wacom tablet (I use an Intuos 3) but its not. Its very annoying because I cant put my fingure on why this is happening. Anytime I ask a friend about it who normally knows alot about photoshop they tell me its that grid option thing which I have already turned off. I have included a screen shot of what the issue looks like. Any ideas anyone?
-
How to implement the grid like this?
Dear All:
I have this grid view as following the sketch :
|DS1|DS2|DS3|DS4|
|------|------|------|------|
|sss |sss |sss |sss |
|sss |sss | sss |sss|
| -----|------|------|------|
|DS5|DS6|DS7|DS8|
|------|------|------|------|
|sss |sss |sss |sss |
|sss | sss|sss| sss |
Note:
1. the border is solid line and "sss" represents white space.
2. might have multiple rows or columns like this pattern.
3. smaller cells are labels and bigger cells are filled with a few different colors
4. when hovering mouse on each bigger cell, the tool tip text will be shown.
5. sizes of the cells are fixed and not changed when the container is resized.
Any clue for implementation? I appreciate all for reply.
JohnosnUse a JTable. If your data is algorithmically derived, consider implementing your own TableModel. You may need to implement your own TableCellRenderer.
-
Load grid like SQL Server Management Studio
Hi
we have a windows forms project with grid.
I would like to emulate the behaviour of SQL Server management studio where upon executing the query, the results start filling in instantaneously and the process continues until all results have been fetched. This way the user doesnt have to wait at all.
Kindly advise whats the best way to achieve above.
Many Thanks
AbhishekIn a virtual mode datagridview, you should only read data when necessary. The whole point of generating extra DataGridView.CellValueNeeded events is to give you the option of not pulling all rows, only for currently visible ones (maybe a little more
for caching).
You should at least cache the data of a row when a cell is accessed (it is likely you will query every column of a row). It also a good idea to cache several pages near the requested row, since the user may be scrolling up and down a bit and you may not
want to hit the database for every single row or every even single page. The few pages near the top and the bottom are also hot areas that are good for caching. BackgroundWorker is kinda clumsy for this task, probably better write this in TPL and queue
data populating tasks when the user scroll up or down.
The caching part is your business logic and is not provided by Windows Forms.
Visual C++ MVP -
How to create a grid like the sample of "profit Centre - Report" use sdk ?
hi
in the grid of "profit Centre - Report", it has a button,if you click it ,it can show the detaildata. it can implement many levels "Expand " and "Collaspe",but it's not implemented by group! i want to know how to implement it by ui dpi or udo .
thanks!Hi,
You need:
- to know the relevant queries
- to make copies (use GetAsXML) from the relevant system forms to mimick the standard functionality
- to do it via UI API (use Grid and DataTable - then you don't need DI API at all)
Here's some more information on DataTable / Grid:
The UI sample no. 19 shows you how to load data into the Grid - via the DataTable...
You can find an enhanced version of the sample (showing you how to get linked buttons, combo boxes etc) in the Education area on SAP Service Marketplace (SMP): http://service.sap.com/smb/education
Or just try these links (need SMP user account for that...) to download the sample from the Archive of "Live Expert Sessions" (includes a few more things):
http://service.sap.com/~sapidb/011000358700006282762006E.zip
That's the link to the PDF for the session:
http://service.sap.com/~sapidb/011000358700006282742006E.pdf
...and that's the recording:
http://service.sap.com/~sapidb/011000358700006280182006E.wrf
HTH,
Frank -
Hi I need values that are abstracted from iterater operation in a fine Grid Layout format .
Please suggest.use this
http://blogs.oracle.com/jdevotnharvest/entry/grid_layouts_in_adf_faces_using_trinidad -
ALV - Mass edit grid like spread sheet
Hi,
Users wanted to edit ALV grid similar to spread sheet for ex: drag a column from right hand botton corner to copy values from first column etc.
Is it possible? if atleast I could display grid in spred sheet and save it back.
Regards
KasiCreated a ALV grid event DOUBLE CLICK and maintained code for this event
-
How to have spreadsheet like columns in report (like an Excel grid)
<p>I am trying to make a report in landscape format with around 15 columns across the sheet. The data is sales numbers per months plus total, budget and deviation (calculated).</p><p>The data should be in an <strong><u>Excel-like grid</u></strong>. The individual cell would obviously be fairly small so it fits across one page.</p><p>I have been playing with this for some time. Aligning so many objects seems to be a lot of work. The tools in CR are not very proficient for such type of layout.</p><p>You are lost if you want to insert a column. I did not find a way to move all fields across all sections to the right to make room. It gets all screwed up.</p><p>The grid, I tried it with borders around the fields and with horizontal / vertical lines to create the grid.</p><p> Any good tip for a better way of doing that?</p><p> Thanks in advance!</p><p>Stefan Koellmann</p>
<p>Is the cross-tab an option for your scenario? If you specifically want a grid like structure, this may be an easier route to explore.</p><p>Alternatively I'd suggest snapping your objects to guidelines (the little inverted triangles on the ruler bar) to help move things around. Or when you select multiple objects, right click and utilize the 'align' and 'size' options to speed up some of the tasks. </p>
Maybe you are looking for
-
How to limit the number of records in WebI Report
Hi, I have a requirement where I need to display the WebI Report data only if the number if record is less than 65k. Incase if the records are more than 65k then the report should be blank and a text message needs to be displayed. The client dont wan
-
ISE 1.2 - Match Policy Set based on endpoint identity group?
Hello, I would like to create a condition that would force MAB'd clients to hit a certain policy set if their MAC address matches one in an endpoint identity group? Is this possible? I feel like a condition can be created using a combination of attri
-
Dump when trying to display characteristic values in QUERY DESIGNER
Hi Experts, Life seems to become a struggle with 7.0 for me :-(. My current problem: If I try to display characteristic values in Query Designer (left section of screnn, wthin dimensions) system dumps frequently. It's that kind of dump, that doen't
-
How do I get rid of white space on one side of image in table cell?
I'm making a disjointed rollover and when ever I add images it creates too much white space to the right of the cell. How can I make the picture fit, so space is not wasted? See image sample with red arrows where I want to remove space. I've remov
-
Reading ZES table - B2 cluster
Hello experts, How to read table ZES from B2 cluster. There is a function module used in standard program RPTBAL00, but that function module is not giving results for table ZES. Please help. Thanks, Ashish Gupta