I have the below code (C#) and am rending out a word wrapped StiText element INSIDE a StiPanel (Mine is inherited in custom class). Both have CanGrow set to true, yet the Panel will not grow and show all of the text when it is taller than the Panel.
What Am I Missing?
IMAGE ATTACHED TO SHOW DISPLAY FAIL. THERE ARE ACTUALL SIX ITEMS IN ARRAY
*** CODE ***
if(param != null)
{
var searchPanel = new StiPanel();
searchPanel.CanShrink = true;
searchPanel.Top = headerText.Bottom;
var tile = new ContentDisplayTile(); //-- CUSTOM PANEL
tile.CanGrow = true; //-- SET CAN GROW
tile.CanShrink = true;
tile.Name = "Tile " + count.ToString();
//tile.Width = .5;
tile.Height = .6;
var keyText = new StiText(new RectangleD(.05, .01, .9, .15));
keyText.CanGrow = true; //-- CAN GROW HERE
keyText.CanShrink = true;
keyText.TextBrush = new StiSolidBrush(Color.Gray);
keyText.Name = param.Key;
keyText.Text.Value = param.Key + ":";
keyText.ShrinkFontToFit = true;
keyText.Font = new Font(FontFamily.GenericSansSerif, 8, FontStyle.Regular);
keyText.GrowToHeight = true;
var valueText = new StiText(new RectangleD(.05, .16, .9, .15));
keyText.CanGrow = true; //-- CAN GROW HERE
keyText.CanShrink = true;
valueText.TextBrush = new StiSolidBrush(Color.Gray);
valueText.Name = param.Value.ToString();
valueText.Text.Value = param.Value.ToString();
valueText.ComponentStyle = "Bold";
valueText.UseParentStyles = false;
valueText.WordWrap = true;
valueText.Font = new Font(FontFamily.GenericSansSerif, 5, FontStyle.Bold);
valueText.GrowToHeight = true;
tile.Width = valueText.Width + .1;
tile.Components.Add(keyText);
tile.Components.Add(valueText);
searchPanel.Components.Add(tile);
header.Components.Add(searchPanel);
}
StiPanel CanGrow Does Not Grow With Internal StiText Elements
-
- Posts: 24
- Joined: Fri Apr 09, 2021 1:44 pm
-
- Posts: 6431
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiPanel CanGrow Does Not Grow With Internal StiText Elements
Hello,
Please send us a sample that reproduces the issue for analysis.
Thank you.
Please send us a sample that reproduces the issue for analysis.
Thank you.
-
- Posts: 24
- Joined: Fri Apr 09, 2021 1:44 pm
Re: StiPanel CanGrow Does Not Grow With Internal StiText Elements
The report is build 100% dynamically in c#. This is the exact code that is building the display tile with the overflow even with the CanGrow property set to true. You can see in the code where it is set, where the text is added etc. What else do you need? We do not have an actual .mrt for this report.
-
- Posts: 6431
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiPanel CanGrow Does Not Grow With Internal StiText Elements
Hello,
We couldn't reproduce the issue on our sample.
Please send us a sample that reproduces the issue for analysis.
Thank you.
We couldn't reproduce the issue on our sample.
Please send us a sample that reproduces the issue for analysis.
Thank you.