iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
When I set the TextBoxStyle-Normal-HorizontalAlign="Right", I can not see the Cursor when focus is put to the control and nothing is in the Textbox or the Cursor is positioned all the way to the right. It seems it is under the border.
I can see it with FireFox, Chrome and Safari.
Is there a way to add more spacing between the TextBox and the Border to reveal the Cursor?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="_Test_InterSoft_WebInput_Default3" %> <%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls" TagPrefix="ISWebInput" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <ISWebInput:WebInput ID="WebInput1" runat="server" MaxLength="5" Width="40px" NumericInput="True" > <CultureInfo CultureName="en-US"></CultureInfo> <DisplayFormat ErrorMessage="Enter a Valid Quantity" ErrorText="Enter a Valid Quantity" IsEnabled="True" Type="Number" Format="#,###.0" > </DisplayFormat> <TextBoxStyle> <Normal Font-Names="Times New Roman" Font-Size="10pt" HorizontalAlign="Right" > </Normal> <Over BaseStyle="Normal" /> <Active BaseStyle="Normal" > </Active> </TextBoxStyle> </ISWebInput:WebInput> </div> </form> </body> </html>
You are correct, under the scenario, the cursor will be overlapped by the border. In order to show the cursor please add 1px padding right to the input element during onfocus client side event, as shown in this snippet:
function WebInput1_OnFocus(controlId){ var WebInput1 = ISGetObject(controlId); WebInput1.GetControlElement().style.paddingRight = "1px"; return true;}
In my test by putting the script section at the end of the html code, we could run the snippet without any issue. HTML snippet:
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body id="body" runat="server" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"> <form id="form1" runat="server"> <div style="margin-left:10px; margin-top: 25px;"> <ISWebInput:WebInput ID="WebInput1" runat="server" MaxLength="5" Width="40px" NumericInput="True" Text="1.2"> <CultureInfo CultureName="en-US"> </CultureInfo> <DisplayFormat ErrorMessage="Enter a Valid Quantity" ErrorText="Enter a Valid Quantity" IsEnabled="True" Type="Number" Format="#,###.0"> </DisplayFormat> <TextBoxStyle> <Normal Font-Names="Times New Roman" Font-Size="10pt" HorizontalAlign="Right"> <BorderSettings> <Bottom Width="0px" /> <Left Width="0px" /> <Right Width="0px" /> <Top Width="0px" /> </BorderSettings> </Normal> <Over BaseStyle="Normal" /> <Active BaseStyle="Normal"> </Active> </TextBoxStyle> </ISWebInput:WebInput> </div> <script type="text/javascript" language="javascript"> function initLoad() { var input = ISGetObject("WebInput1"); input.GetControlElement().style.width = "36px"; } initLoad(); </script> </form></body></html>
In summary, there is still 2 issue based on the test, border and width.
Is there anything I can set on the Server Control or in Server Side Code?
Using the latest version if WebInput, you will need to use the OnFocus client side workaround in order to modify the padding in the WebInput. By default WebInput will always set the padding to 0 in its element style, the available property in the TextBoxStyle will be writen to the CSS and overwritten by the element style.
How do I submit a Feature Request with this interface since I can no longer do it in the Developer Network?
I would like a Server Control Property to handle this rather than the Client Side OnFocus Event workaround.
A feature request has been submitted to handle such scenario automatically. Currently, for feature request you will need to create a thread in the forum and let the support member submit the feature request to the developer.
Hi,
I have just tried 4.0.7200.5 and the workaround is no longer needed.
BUT, initially everything is shifted to the Right and some of the right digit can not be seen. Additionally, there is an extra Inside Top and Left Border.
After typing, everything is shifted to the Left and the Left Inside Border goes away and all of the right digit can be seen but the Top Inside Border is still there. After that, the Left Inside Border remains gone until the page is refreshed.
Doug
Glenn is not available until Tuesday, September 28th, 2010.
I will check the progress status of the feature request and will contact you as soon as I get any news regarding the feature request.
It looks like the feature request was attempted however it create more problems.
Based on my test, the digit is diplayed fine. In my test environment I am using WebInput 4 and WebUI Framework 3 build 5 and 755 respectively and the provided snippet code in the first post. If you already use the latest build for WebInput and WebUI Framework do you mind providing a screesnhot or detail for this issue so I could analyze further?
Regarding the extra border, you will need to set the border width to 0. Here is the snippet:
<Normal Font-Names="Times New Roman" Font-Size="10pt" HorizontalAlign="Right"> <BorderSettings> <Bottom Width="0px" /> <Left Width="0px" /> <Right Width="0px" /> <Top Width="0px" /> </BorderSettings></Normal>
I am using WebInput 4.0.7200.5 and WebUI Framework 3.0.5000.755.
Add Text="1.2" to the WebInput.
<ISWebInput:WebInput ID="_WebInput" runat="server" MaxLength="5" Width="40px" NumericInput="True" Text="1.2" >
Before typing in anything into WebInput, the 2 is chopped off After typing in 1.2 all of the number can be seen
After adding borders:
Before typing in anything into WebInput, the 2 is chopped off but not as much After typing in 1.2 all of the number can be seen.
See attached file.
Thank you for the detail description of the issue. Using the snippet i have sucessfully replicate the issue on my environment. I have added these findings to the earlier feature request to indicate the feature has not been fully applied.
In the mean time, in my test, in order to resolve the first load issue you will need to set the width of the internal input element to a smaller size than the one defined in tthe WebInput. From my analysis the difference seems to be 4px. Here is the snippet:
<script type="text/javascript" language="javascript"> function initLoad() { var input = ISGetObject("WebInput1"); input.GetControlElement().style.width = "36px"; } initLoad();</script>
When I tried you code, ISGetObject was not an object yet.
I had to call it after the window loaded.
function initLoad() { var input = ISGetObject("WebInput1"); input.GetControlElement().style.width = "36px"; } //initLoad(); window.onload = initLoad;
So the 2 issues are:
- border
- width
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname