Home Search Member List Faq Register Login  
UltimateSpell
UltimateSpell Textbox resize

Thread Starter: serco   Started: 08-20-2009 10:49 AM   Replies: 7
 Karamasoft Support Forums » General Discussions » UltimateSpell » UltimateSpell Textbox resize
 Printable Version    « Previous Thread   Next Thread »
  20 Aug 2009, 10:49 AM
serco is not online. Last active: 8/28/2009 8:51:41 AM serco

Not Ranked
Joined on 08-20-2009
Posts 3
UltimateSpell Textbox resize
I have ultimatespell textbox on a page that will not resize with a window resize.  I have tried the clientside script .Position() but this only resizes the textbox when the window gets larger and does not work when resizing the window down.  Any suggestions?
  
  20 Aug 2009, 2:51 PM
Karamasoft is not online. Last active: 9/8/2010 11:48:21 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 5,334
Re: UltimateSpell Textbox resize
We don't know how you resize your original textboxes when the textbox is resized. If you send us a self-contained web app having this issue, we can try it in our test environment. Thanks.
  
  25 Aug 2009, 6:49 AM
serco is not online. Last active: 8/28/2009 8:51:41 AM serco

Not Ranked
Joined on 08-20-2009
Posts 3
Re: UltimateSpell Textbox resize
Try any of your own test web apps that have a textbox with a percentage width  and you will notice that the UltimateSpell prevents the textbox from resizing to the set percentage of the window (when window size changes). 
 
Let me know if I am wrong about this and it actually works for you?

Example of how I have used UltimateSpell:

<asp:Panel ID="pnlJust" runat="server" Width="100%">

<table width="100%">

<tr>

<td>

<asp:Label ID="Label5" runat="server" CssClass="fontStyle" Text="Justification" />

</td>

</tr>

<tr>

<td colspan="2">

<asp:TextBox ID="uiJustification" runat="server" CssClass="fontStyle" TextMode="MultiLine" Rows="20" style="width:99%" />

<cc1:UltimateSpell id="UltimateSpell1" runat="server" SpellAsYouType="True" ShowSpellButton="False"

ControlIdsToCheck="uiJustification" CustomDictionary="SpellAsYouType"></cc1:UltimateSpell>

</td>

</tr>

</table>

</asp:Panel>


  
  25 Aug 2009, 4:17 PM
Karamasoft is not online. Last active: 9/8/2010 11:48:21 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 5,334
Re: UltimateSpell Textbox resize
The following code works properly in our test environment:

1) Add the following script to the HEAD section of your page:

<script type="text/javascript">
function Reposition() {
if (window.UltimateSpellAsYouTypes) {
for (textBoxId in UltimateSpellAsYouTypes) {
UltimateSpellAsYouTypes[textBoxId].Position();
}
}
}
</script>

2) Add onresize event handler to the BODY element of your page as follows:

<body onresize="Reposition()">

  
  26 Aug 2009, 8:48 AM
serco is not online. Last active: 8/28/2009 8:51:41 AM serco

Not Ranked
Joined on 08-20-2009
Posts 3
Re: UltimateSpell Textbox resize
OK I added that javascript and that killed the application (IE Locked up and hand to end task).  What I ended up doing is removed the textbox from the table and panels which seems to fix the problem.

<div style="position:relative;">

<div style="width:67%;">

<asp:Label ID="Label5" runat="server" CssClass="fontStyle" Text="Justification" /><br />

<asp:TextBox ID="uiJustification" runat="server" CssClass="fontStyle" TextMode="MultiLine" Rows="20" style="width:100%" />

<cc1:UltimateSpell id="UltimateSpell1" runat="server" SpellAsYouType="True" ShowSpellButton="False" ControlIdsToCheck="uiJustification" CustomDictionary="SpellAsYouType"></cc1:UltimateSpell>

</div>

</div>

So it should be noted that when ultimatespell is in a table / panel or even div (div with style position:relative; float:rightWink you will get strange behavior.

Let me know if you all get this issue fixed in the next updates.


  
  08 Feb 2010, 2:38 PM
fotstein is not online. Last active: 3/10/2010 10:43:11 AM fotstein

Top 10 Posts
Joined on 02-03-2010
Posts 32
Re: UltimateSpell Textbox resize
I am having the same problem with textboxs widths, they work fine when specifying the pixels but don't work if you set the width to a percentage (of a cell).  Is this a know issue? I am calling the reposition function. 

I think I am going to try to set the pixel with manually with js.

  
  08 Feb 2010, 5:06 PM
Karamasoft is not online. Last active: 9/8/2010 11:48:21 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 5,334
Re: UltimateSpell Textbox resize
Reposition method should normally resize your spell as you type boxes but if you place your TextBox control in a container such as DIV or TABLE, you might experience a problem. When do you call the Reposition method, during the OnLoad client-side event handler of your UltimateSpell control? If you reply with your code, we can help you better.
  
  08 Feb 2010, 8:36 PM
fotstein is not online. Last active: 3/10/2010 10:43:11 AM fotstein

Top 10 Posts
Joined on 02-03-2010
Posts 32
Re: UltimateSpell Textbox resize
It's in a grid, so a table... I am setting it manually in pixels when the page loads and whenever there is a resize, this seems to be working but it would be a lot easier if percentage in a div or table would work.
  
 Page 1 of 1 (8 items)
Karamasoft Support Forums » General Discussions » UltimateSpell » UltimateSpell Textbox resize

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2010 Karamasoft LLC. All rights reserved.