using callout

1 Answer 108 Views
Callout
atfat
Top achievements
Rank 1
Iron
Iron
atfat asked on 30 May 2021, 05:21 PM

hi,

how to set a callout size to autosize to fit its content where it holds a radlabel control with wraptext mode once it is used as a tooltip?

thx in advance...

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 31 May 2021, 07:37 AM

Hi, Atfat,

I would like to note that the size of RadCallout depends on the size of the AssociatedControl. If you have a UserControl with fixed size and it contains multiple other controls to achieve the desired look, the RadCallout will be sized to fit the UserControl. If you want to shrink or enlarge the callout, feel free to adjust the size of the AssociatedControl accordingly.

As to the label, you can also specify size which is expected to take effect when the AutoSize property is disabled. Thus, the text can be forced to :

        RadCallout callout;
        RadLabel label;
        public RadForm1()
        {
            InitializeComponent();

            this.radGridView1.Columns.Add("Id");
            this.radGridView1.Columns.Add("Name");
            for (int i = 0; i < 10; i++)
            {
                this.radGridView1.Rows.Add(i, Guid.NewGuid().ToString());
            }
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
             

            label = new RadLabel();
            label.TextWrap = true;
            label.AutoSize = false;
            label.Size = new Size(50, 100);
            label.Text = "Telerik";
            callout = new RadCallout();
            callout.AssociatedControl = label;  
        }

 

 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Callout
Asked by
atfat
Top achievements
Rank 1
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or