[CLOSED] checkbox duplicate boxlabel

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] checkbox duplicate boxlabel

    Hi,
    I have this problem with checkbox and also with radiobutton; I create a checkbox runtime and I define a boxlabel for it; before render it I want to change the boxlabel (translate it) but it does not work; it displaies duplicated text.
    I simulate the "application" i am developing so I can not change the schema.

    Please see the attached example.

    Many thanks
    Attached Files
    Last edited by Daniil; Nov 07, 2011 at 7:40 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please post the code right here wrapping in [CODE] tags.
  3. #3
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="TEST_TRANSLATION.aspx.vb" Inherits="TEST_TRANSATION"  %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" Locale="it-IT">
            </ext:ResourceManager>    
            <ext:Hidden ID="CaricaRichiesta" runat="server" Text=""></ext:Hidden>
            <ext:Button runat="server" ID="Avvia" Text="Carica Campo">
                <DirectEvents>
                    <Click OnEvent="Carica"></Click>
                </DirectEvents>
            </ext:Button>  
            <ext:Panel runat="server" ID="esterno">
                <Items>
                    <ext:FormPanel ButtonAlign="Left" ID="FormPanelRichiesta" runat="server" Title="FORM" BodyStyle="padding:5px;" Frame="false" AutoHeight="true" Border="false">
                        <Items>     
                            
                        </Items>
                    </ext:FormPanel>       
                </Items>
            </ext:Panel>
       
        </form>
    </body>
    </html>

    parte vb
    Imports Ext.Net
    
    Partial Class TEST_TRANSATION
        Inherits System.Web.UI.Page
    
        Protected Sub TEST_TRANSATION_Load(sender As Object, e As System.EventArgs) Handles Me.Load
            If CaricaRichiesta.Text = "S" Then
                CaricaCampo(False)
            End If
        End Sub
        Private Function CreaLabelObbligatorio(ByVal Obbligatorio As Boolean) As Ext.Net.Label
            Dim lblObbligatorio As New Ext.Net.Label
            lblObbligatorio.StyleSpec = "font-weight: bold; color:red; width:10px;"
            If Obbligatorio Then lblObbligatorio.Text = "*"
            Return lblObbligatorio
        End Function
        Private Function CreaEtichetta(ByVal ID As String, ByVal Etichetta As String) As Ext.Net.Label
            Dim lblEtichetta As New Ext.Net.Label
            If Etichetta <> "" Then Etichetta = Etichetta & ":"
            lblEtichetta.ID = "Etichetta_" & ID
            lblEtichetta.Text = Etichetta
            lblEtichetta.Width = 130
            Return lblEtichetta
        End Function
        Private Function CreaDaValidare() As Ext.Net.CompositeField
            Dim CompField As New Ext.Net.CompositeField
            CompField.ID = "CompFieldDaValidare"
            CompField.AnchorHorizontal = "100%"
            CompField.HideLabel = "true"
            CompField.LabelWidth = "0"
            CompField.Items.Add(CreaEtichetta("Checkbox", "Test Checkbox"))
            CompField.Items.Add(CreaLabelObbligatorio(True))
    
            Dim chkDaValidare As New Ext.Net.CheckboxGroup
            chkDaValidare.ID = "chkDaValidare"
            chkDaValidare.ColumnsNumber = "1"
            chkDaValidare.Width = "100"
            Dim chkValida As New Ext.Net.Checkbox
            chkValida.ID = "chkValida"
            chkValida.BoxLabel = "LINGUA ITALIANO"
            chkValida.Checked = True
            chkDaValidare.Items.Add(chkValida)
            CompField.Items.Add(chkDaValidare)
            Return CompField
        End Function
     
        Private Sub CaricaCampo(Optional ByVal Render As Boolean = True)
            Dim Pannello As Ext.Net.CompositeField = CreaDaValidare()
            If IsNothing(Pannello) Then Exit Sub
            Pannello.AutoHeight = False
            Pannello.AutoWidth = False
            FormPanelRichiesta.Add(Pannello)
            If Render Then
                Cambia()
                Pannello.Render()
                CaricaRichiesta.Text = "N"
            Else
                CaricaRichiesta.Text = "S"
            End If
        End Sub
        Protected Sub Carica(sender As Object, e As System.EventArgs) Handles Avvia.Click
            CaricaCampo(True)
        End Sub
        Private Sub Cambia()
            Dim OBJ As Object = FormPanelRichiesta.FindControl("chkValida")
            If Not IsNothing(OBJ) Then
                OBJ.boxLabel = "LINGUA INGLESE"
            End If
        End Sub
    End Class
  4. #4
    Thanks.

    When I run the page and click on the button a checkbox with the "LINGUA INGLESE" box label and, I guess, it's not duplicated.

    What label is on your side?
  5. #5
    Quote Originally Posted by Daniil View Post
    Thanks.

    When I run the page and click on the button a checkbox with the "LINGUA INGLESE" box label and, I guess, it's not duplicated.

    What label is on your side?
    I do not understand...please see the attached image.
    Attached Thumbnails Click image for larger version. 

Name:	TEST.jpg 
Views:	100 
Size:	65.6 KB 
ID:	3383  
  6. #6
    Quote Originally Posted by PoloTheMonk View Post
    I do not understand...please see the attached image.
    My explorer version is 8.0.7601.17514 ... if it is usefull...
  7. #7
    Thanks for the image, it was helpful to clarify the situation, now I'm sure that the issue is not reproducible on my side, on IE8 as well.

    I think it's not related to a browser, but related to an Ext.Net version.

    What Ext.Net sources do you use?
  8. #8
    Quote Originally Posted by Daniil View Post
    Thanks for the image, it was helpful to clarify the situation, now I'm sure that the issue is not reproducible on my side, on IE8 as well.

    I think it's not related to a browser, but related to an Ext.Net version.

    What Ext.Net sources do you use?
    Sorry for my later reply; my Ext.Net version is 1.0.0.15317.
  9. #9
    I've just tried with the official Ext.Net 1.0 release and the issue still doesn't appear for me.

    Could you send your three main Ext.Net dlls on support@object.net to check?
  10. #10
    Quote Originally Posted by Daniil View Post
    I've just tried with the official Ext.Net 1.0 release and the issue still doesn't appear for me.

    Could you send your three main Ext.Net dlls on support@object.net to check?

    I send you an email. Many thanks
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Ext.net v2 Beta release: Checkbox BoxLabel property is
    By supera in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 19, 2012, 1:01 PM
  2. Set boxlabel of checkbox to the left side
    By wh0urdady in forum 1.x Help
    Replies: 0
    Last Post: Jun 14, 2010, 5:52 PM
  3. Replies: 1
    Last Post: Aug 07, 2009, 12:56 AM
  4. [CLOSED] Checkbox BoxLabel font different
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 27, 2009, 8:15 AM
  5. [INVALID] CheckBox BoxLabel?
    By Timothy in forum Bugs
    Replies: 3
    Last Post: Jun 24, 2008, 5:43 AM

Posting Permissions