I'm using the 'IOS Table View Controller' template. The default overrides have TitleForHeader and TitleForFooter set the titles to 'Header' and 'Footer' respectively. From what I understand if you use those methods then defaults for the header and footer views are used.
I've removed those overrides there are still spaces where the headers and footers should be. I've overridden GetViewForHeader and GetViewForFooter to return null, and HeightForHeader/Footer to return zero and the spaces remain. I've even tried creating a UIView with zero height and width and returning that, along with setting the header or footer height to zero and the spaces remain.
Is there any way to tell Monotouch to not use a header or footer?
I found that adding this in viewDidLoad removed the extra space:
this.TableView.SectionFooterHeight = 0;
Related
I want a page break after every chapter and every section.
We can get page breaks in restructured text, anywhere we want using:
.. raw::pdf
PageBreak
The good thing is this works both with rst2pdf as well as rinohtype. However, the advantage with rinohtype is we can achieve the same without adding the above code manually after every section using stylesheets.
I am just not sure how we can do that using stylesheets, can anyone help?
Using a custom style sheet, you can force page breaks before arbitrary sections by setting the page_break style attribute (in the upcoming 0.5.0 release, page_break can be set on any flowable, not just sections).
To insert a page break at an arbitrary point:
Indicate where to insert the page break:
or using the class directive (or rst-class in Sphinx) before a body element, or
assign a class to a directive by setting the :class: attribute
Define a style with a selector matching the class name. This is achieved by means of the has_class selector attribute.
The page break will be inserted before the corresponding element.
Here's an example, assuming you're using rinohtype 0.4.3.dev1 or later:
Your reStructuredText file:
.. image:: images/screenshot.png
:class: page-break
A regular paragraph.
.. rst-class:: page-break
This paragraph will trigger a page break.
Your custom style sheet:
[page-break-paragraph : Paragraph(has_class="page-break")]
base = default
page_break = any
[page-break-image : Image(has_class="page_break")]
base = image
page_break = any
Note that the newly defined styles will also determine the styling of the page-breaking element. To style them like other elements in the document, you need to set their base style to the default style. Refer to the style log to figure out which styles these are.
See issue #186 for some more details about page breaks in reStructuredText and rinohtype.
I have a react-virtualized Table with some lengthy column headers, and want the column headers to wrap rather than trail off with an ellipsis. Anyone know how to make this happen?
For reference, here's some example code:
makeTable = <AutoSizer>
{({ width, height }) => (
<Table ref={this.setTableRef.bind(this)}
width={width}
height={height}
headerHeight={20}
rowHeight={this._rowHeight.bind(this)}
rowCount={this.props.reportRows.length}
rowGetter={this._rowGetter.bind(this)}
rowClassName={this._rowClassName.bind(this)}
>
<Column
label='Super Long Column Header Name of Longness'
dataKey='testCase'
width={150}
flexGrow={1}
cellRenderer={this._testCaseCellRenderer.bind(this)}
/>
[truncated the code above]
As you can see, it's the label I need to wrap, but no style I apply is working, be it in the Column or the css. Help? Thanks!
I assume you are including the styles as specified in react-virtualized? For context, what is applying the style is this line in their stylesheet.
It looks like the className is hard injected when loading default render so you have to either override this style with your own style that is of the same name, define your own style that somehow can apply a style to this element with a higher CSS specificity or, overkill, define your own headerRenderer which Column provides a way to do.
Just an FYI -- naturally react-virtualized has a lot of its components in a certain way and the responsive aspect of it is true as well. I would recommend playing around in their playground via the CSS in Chrome Dev tools so if removing the wrap behaves as expected and it doesn't, you can see what you may need to change.
I've noticed when I add a Header CSS class in the web part properties, this value is added to the span and it's parent div for the header. Is this intentional? and what's the easiest way to 'fix' this. Ideally i think the class should only be applied to the wrapper tag on the header copy.
Inspecting the HTML as you mentioned both the Div and the Span have your Header Class and you can tell by the generated IDs that Kentico have used asp:Panel and asp:Label controls.
Also it's worth noting that if you omit the Collapsed and Expanded text there is no Span.
I suspect that Kentico have made a concious decision to set the CssClass property on both Controls so that your class applies directly to the text in the Span. However this could have a negative side affect of applying your class to both Elements with CSS properties such as Padding and Margins.
The 'fix' for now would be to handle this in your CSS. Eg.
Div.yourClass { padding: 5px; background-color: #eee;}
Span.yourClass { color: #333;}
I am using JDeveloper 11.1.2.3.0,
I have an inputFile component in my page that takes its text value from the name of some components. The problem is that that when the text is long it gets displayed all there and may even occupy the whole window. Is there any possibility to wrap this text value in this case?
I don't think <af:inputFile> has a labelStyle attribute:
You can try adding the CSS in the component's inlineStyle or contentStyle
<af:inputFile inlineStyle="word-wrap:break-word;" />
It depends if the very long text is in the content or the label of the field.
If this doesn't do the trick, you can try creating a custom skin and customizing the label or content style via the adf style selectors: af|inputFile::content , af|inputFile::label.
Btw, you need to check if word-wrap works on all browsers you're targeting.
You can try setting the labelStyle attribute of the <af:inputFile> component to wrap the contents of the label. I am not sure of the CSS style attribtue information for it, but searching on the net I found word-wrap:break-word;.
I too had this problem with af:inputFile.
Just give contentStyle="width:200px" it will solve the issue.
we can adjust the width accordingly.
I have a couple of custom cells and web views inside each of these cells. Now,my requirement is to find the height of the HTML string to be loaded on the webview, then based on this change the Custom cell height and the webview height.
I am aware that the document's height can be found in the -webViewDidFinishLoading delegate, but in my app i have a lot of cells and webviews inside each of these cells, so i feel that the app would slow up while scrolling and making unnecessary callbacks
At present i am doing this which gives me the string height.
-(float)getDynemicHeight:(NSString *)pstrText
{
CGSize constraint = CGSizeMake(683,600);
CGSize size = [pstrText sizeWithFont:[UIFont systemFontOfSize:18] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap];
CGFloat height = MAX(size.height, 44.0f);
if (height>400) {
return 400;
}
return height;
}
This however causes a problem as even <div> elements are considered as string and hence a larger value of height is returned
In iOS 6, if you just want to show styled text (not text with images mixed in or something like that), you might like to use NSAttributedString instead of a web view. It allows you to create text with different styles in different stretches of text, paragraph margins, etc. etc. Its metrics are well defined and it comes with measurement methods. Simple UIView subclasses such as UILabel can now display an attributed string. Or you can just draw it yourself, directly into the interface.
http://www.apeth.com/iOSBook/ch23.html#_attributed_strings
If you can't do that, then what you're trying to do is basically impossible. You don't know how the Web view will draw a piece of complex HTML until it has drawn the complex piece of HTML. You will simply have to change your app's architecture. For example you could draw all the Web views way ahead of time so you have the needed info during table-dataSource time.