Thanks for reading my post.
I just started developing an app in Ionic 3 and there is an issue I ran into. I want to have a box to enter text into. When I use following code, I can enter both single line text as well as multiple line text.
<ion-item>
<ion-label>Message</ion-label>
<ion-textarea [(ngModel)]="_message" name="message"></ion-textarea>
</ion-item>
But the issue is that the size of the box does not change. As I press Enter and type more words, the upper text hides because the view scrolls down. There is still space left in the view and I tried to adjust it, but couldn't.
Also, upon doing Google research, I did found a comment mentioning that this is a defect in Ionic Framework. But, I am not sure.
Thank You
It doesn't dynamically grow by itself. But you can increase the number of rows statically by adding rows.
<ion-textarea rows="5" [(ngModel)]="_message" name="message"></ion-textarea>
You can also try to modify its size dynamically yourself. Here is a sample code that does this.
Related
This question is related (follows from) this question.
I am dynamically generating Word documents from data in a database. In the generation I need to have the First Page of a section have a different top margin than the other pages in the section. For reason that would take too long to explain properly, I can't just create a new section with a different top margin.
To get around my problem I thought I would create a shape (rectangle) with no border and no fill (invisible) that was the height I wanted my margin to be. I would then place it absolutely at (0,0). I would also make it wrapTopAndBottom so that it pushed the text in the body of the page down. This is working... except for one small problem.
As you can see there is a large, blank area immediately after my shape. There are actual blank lines there. You can see the lines better in this image where I've put text in those lines.
When I look at the header xml file in the Word archive, those lines don't exist. I'm not sure where they are coming from or how to get rid of them. I can manually remove them using Word but every time I regenerate the file they get put back in there. If someone knows why this is happening and / or how to get around it, I'd appreciate the help.
Thanks.
I finally figured this out.
Sorry I couldn't post code up here. First, I'm not using C#, I'm using PHP. Second, the amount of code I'd have to post to show how the header is getting created is prohibitive on a forum like this. Third, I'm not really allowed to post the company's code up here.
In any case, the problem was simple once I saw it. We are placing multiple absolutely positioned objects (shapes, text, images, whatnot) inside the header. In the class that creates these objects each one was being placed inside a <w:p> element. For example, if there were 3 such objects, the XML looked like this.
<hdr>
<p>Some Object</p>
<p>Some Object</p>
<p>Some Object</p>
</hdr>
The problem is that even though each of the objects inside the <p> are absolutely positioned, the <p> element itself creates a line and space for that line. So the header above would have 3 blank lines in it. This became an issue if the header had 6 or 7 objects because the blank lines would push the header's margin down and force the page's content down as well. This was undesired behavior.
The solution is simple. All the absolutely positioned objects can be placed in the same <p> element. This leaves only 1 blank line in the header no matter how many objects you have.
I was building a module in gwt. One of the functionality is that I will get multiple records in GridPanel from database. When I hover over on a particular record it should display some information like "click on the row to provide feedback". I have implemented it and it is working fine. But for IE when I hover over, it is displaying the message at top-left corner. Getting alignment problem.
Used this line in my code.
grid.setToolTip("Click on the row to provide feedback");
Ok, so I'm using the suggested window-scrollTo method and it's working just swimmingly everywhere except for one little sticking point.
When Safari decides to show the "Reader" button figuring I might want to save my page for later reading, it keeps the address bar up for a full 5 seconds before finally hiding it like I asked. Kind of an eternity in UX time.
Is this an iOS 6 thing or did it also do this in iOS 5? (I don't have a 5 device to test it on at the moment.) Also, is there any way to get around it?
I've looked around quite a bit and there doesn't appear to be any way to disable the reader button. The only possible solution I found was to make your site less "readable" so Safari doesn't add the reader button. Exactly what makes a site "readable" is pretty murky.
Here's some research on what makes something "readable": http://mathiasbynens.be/notes/safari-reader
Here's a method to make it less readable by putting your content in CSS: http://askmike.org/2012/12/a-hacky-way-to-remove-the-reader-button-in-ios-safari/
The bottom line seems to be that there is no solution. Hopefully Apple will add a meta tag to disable it or at least let us hide the address bar faster.
Here is what worked for me:
I placed all content inside an ol tag.
<ol style = "padding:0;margin:0">
my content
</ol>
From what I read elsewhere, the reader is partly triggered by the number of words on a page, but does not count words inside an ol.
You can disable the reader button by hiding the content that triggers it.
And then displaying that content 1s after the page loads.
For instance, hide all your <p> elements if they are triggering the reader button.
I have a combo box that when I open it should show text like
However I get something like
with the scrollbar set to middle. Thing is sometimes for the same values it shows properly
and sometimes it shows from middle(for same value).
I want it to show properly like in the first image and I've tried a couple of things but with no succes.
itemSection.setHoverAlign(Alignment.LEFT);
itemSection.setTextAlign(Alignment.LEFT);
itemSection.setAlign(Alignment.LEFT);
... and other irelevand stuff ...
Any help is highly appreciated. Thanks alot!
If I am not getting wrong, You want to set your scrollbar at particular position. FOr that you need to ovverride the css of that and try to set scrollbar position to 0. So that your problem will get solved.
The problem with any kind of selections box is, that the boxes display and behave completely different across browsers. The older the browser the worse it handles long texts in selection boxes (some just truncate the text). I suggest to keep the displayed text as short as possible. That way you can avoid this problem.
If you really need long description, you can try to add a tooltip to every entry. Or use a different widget to make the select from, e.g. some custom widget in a separate dialog...
I'm using MFMailComposeViewController inside my application and I've noticed that part of the message has been cut off. Right now it's only trimming the "Sent from my iPhone" text, but should users remove this, I don't want any of the message trimmed back.
Here's a screen cap of what I'm talking about:
To keep my app description as simple as possible, I'm launching the controller from a TabController and it covers the whole screen as a modalView.
I had the same problem and found that it was a header tag at the beginning of the html which seemed to be throwing the entire system spacing off. NO IDEA WHY
Limit yourself to <div><p> using inline styles to get the look you want and it should correct the issue
Or even more simply, put a non breaking spacer before the <h1> or <h2> etc