Hi,
I'm not sure if this is the correct subforum for ultralabels but i wasn't sure where it was, couldn't find Misc or Ultralabel forum.
the new styling of the forum looks sharp indeed, way to go. how ever it appears that i can't insert a image here.... it doesn't let me brawser for the image . i am using (IE8) - this is just FYI
anyway, i am expiriancing a wierd issue with a simple usage of ultralabel.
i have a simple forum with 2 ultragrids and 2 labels, each label is like a title for the grid.
when i load the forum and give the datasource for the grids i am also appending the number of the number of the rows for each label of its relevant grid. very basic stuff
here is my code :
ugMissing.DataSource = ds.Tables[0];ugActive.DataSource = ds.Tables[1];lblMis.Text = lblMis.Text + " (" + ds.Tables[0].Rows.Count.ToString() + ")";lblMis.Refresh();lblActive.Text = lblActive.Text + " (" + ds.Tables[1].Rows.Count.ToString() + ")";lblActive.Refresh();
the problem is that while the second label does refresh and show the "(##)" at the end of its string, the first label does not. i can't understand why.debugging line by line with F10 shows that the lblMis.Text does append the "(##)" to its end but it does not display it on screen, dispite the Refres();I've replaced the UltraLabel control with the default WinForms Label control and set the name of the control object to the same name that the UltraLabel was - lblMis, and didn't change anything in my code, and the display did show the "(##)" which it didn't before when the control was UltraLabel. what i dont understand is how come the second ultralabel worked fine and the first did not. ofcourse i can leave it as a basic WinForm label , i was just wondering why it happens ?
i've also tried
lblMis.Text = lblMis.Text + "xxx"; // (" + dsResourceVScdis.Tables[0].Rows.Count.ToString() + ")";lblMis.Refresh();
not working as well.
any ideas?
Thanks for the reply Mike,
i already changed it to the default winforms label, but just out of curiocity i changed it back to UltraLabel and made sure the problem was still there.
then from your comment "too small" i realized that i probably forgot to Dock the label into the TableLayoutPanel and the width of the label kept the original size as set by the designer when i have inputed the text into he Text property of the label. so i docked the label and that indeed solved the problem.
on one hand, silly me for forgetting to dock, on the other hand, i think i didn't dock the second ultralabel as well and it still worked fine, i can't be sure now because i cannot Ctrl+Z to that point inorder to confirm, but i can tell you that with the WinForms Label i 100% forgot to dock it and it still worked fine. so perhaps there is still something to think about.
also there was no other control that is covering the text on the right side.
with regards to the forum issue, not sure if it helps but here are the JavaScript errors i am getting on this page. i am not sure why it says Mozilla/4.0, i am using IE8
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; InfoPath.3)Timestamp: Tue, 10 Jul 2012 06:07:23 UTC
Message: Expected ':'Line: 6483Char: 5Code: 0URI: http://ko.infragistics.com/community/ScriptResource.axd?d=eIdAEYyQAK9OLKw1QEsOu_622ywnn5aDxPAS3M0lVn10kOqwdFvQ8mlbi1cPtqcyKjAiUHfuRHep3p0SxQNVZTJ4o1D8AD47cEkJOsQ-8QHNNPPXKzabxHKnXXDd9lC5ss-TrmWjKuRRQUHCEME_QbYHsnJygAVvhzcvjg2&t=40d258c3
Message: ASP.NET Ajax client-side framework failed to load.Line: 184Char: 34Code: 0URI: http://ko.infragistics.com/community/forums/AddPost.aspx?ReplyToPostID=361448
Message: 'Type' is undefinedLine: 10Char: 1Code: 0URI: http://ko.infragistics.com/community/ScriptResource.axd?d=H4MlH-FKempkGRTyEL6GJBgvQ7NOR7Y32Bz5R1PWiClgcoLIJhGbTes3TWUUS06QTZllDpkX31BPpwxQueDi7CQXe7Y5a50jjAkjD50jHIWCAob4yoAc3cczpet2rftzzWmAuVlSCAjeZoFaVajuW76AgHBo3zUH6r5AG0ibLd5BphvG0&t=40d258c3
Message: 'Type' is undefinedLine: 11Char: 1Code: 0URI: http://ko.infragistics.com/community/ScriptResource.axd?d=yC_v3TUksxayXElVoDDn5EbzcURX4a4Vxa0_4I4fQa73IdE2idFjzVHZl_QjpDDbQgnOSTeVIABHDWRLxSNenyRT7ZfH3uIh9OvK-4eYbARPOtc1J0n1o8gadSdzsIOEjHvJK3rRETq1VjxfWqAaBMbX_2Dp7nrIw_mVglwIwlVhuh7rzZ7X9ibcFPI1&t=40d258c3
Message: 'Sys' is undefinedLine: 192Char: 1Code: 0URI: http://ko.infragistics.com/community/forums/AddPost.aspx?ReplyToPostID=361448
Message: 'Sys' is undefinedLine: 204Char: 1Code: 0URI: http://ko.infragistics.com/community/forums/AddPost.aspx?ReplyToPostID=361448
I forwarded your comment about the forums not supported images over to the folks in charge of our new forums so they can check it out. Thanks for the info.
Regarding the label, I can't see any reason why the text should not display. Is it possible that the label is simply too small and so the text is getting clipped? Or that some other control is covering the right-hand side of it so that you cannot see the text?
If that doesn't help, perhaps you can attach a small sample project here which demonstrates the issue so we can check it out.