# Font TextStyle getting Problem using SlitContainer

**URL:** <https://community.thinkgeo.com/t/font-textstyle-getting-problem-using-slitcontainer/8492>\
**Category:** WinForms\
**Created:** [April 5, 2017, 5:49am UTC](https://community.thinkgeo.com/t/font-textstyle-getting-problem-using-slitcontainer/8492 "2017-04-05T05:49:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [April 5, 2017, 5:49am UTC](https://community.thinkgeo.com/t/font-textstyle-getting-problem-using-slitcontainer/8492/1 "2017-04-05T05:49:46Z")

</div>

Hi,

```
   I am getting a strange problem using SlitContainer control then Font TextStyle getting Problem.

```

it means that, I am using TextStyle(Font) for displaying icons(images).  
It’s coming correctly by with out applying SlitContainer.

 ![](https://community.thinkgeo.com/uploads/default/original/3X/8/8/8811a6f96a591cfe724e15ddfc8d3142f61529b6.png)

Whenever applying SlitContainer to the Form. the position of ICONS getting changed.

 ![](https://community.thinkgeo.com/uploads/default/original/3X/0/4/04d60da8d8af84c4291ff13db2d19b19f0410dbf.png)

Please tell me, what is the problem and suggest me to solve this issue.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Emil](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/emil/32/19043_2.png) [@Emil](https://community.thinkgeo.com/u/Emil)\
**Post date:** [April 6, 2017, 8:04am UTC](https://community.thinkgeo.com/t/font-textstyle-getting-problem-using-slitcontainer/8492/2 "2017-04-06T08:04:02Z")

</div>

Hi Riyaz,

Could you please append more information here? I’m not sure the relationship between the SlitContainer Control and the map, and how do you achieve the TextStyle for displaying icons. Some code snippet are helpful, a simple sample is welcome.

Thanks,  
Emil

---

<div class="post-metadata">

**Author:** ![riyas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@riyas](https://community.thinkgeo.com/u/riyas)\
**Post date:** [April 6, 2017, 9:40am UTC](https://community.thinkgeo.com/t/font-textstyle-getting-problem-using-slitcontainer/8492/3 "2017-04-06T09:40:03Z")

</div>

HI Emil,

```
  Thanks for your reply.

```

Here I am giving sample code for displaying icons(images) using TextStyle(Font).

TextStyle ts\_IconAircraft = new TextStyle(“IconAircraft”, new GeoFont(“Aircraft\_b”, 40, DrawingFontStyles.Regular),new GeoSolidBrush(GeoColor.FromArgb(255, 0, 173, 239)));  
fAircraft.ColumnValues.Add(“IconAircraft”, “A”);

‘Aircraft\_b’ is custom generated Font file( A–Type of Aircraft).  
As per my previous discussions, displaying icons(images) using TextStyle(Font) working fine(BeforeFC.png) with out opening ‘Split Container’ application.

But whenever Open the ‘Split Container’ application then TextStyle(Font) miss matching(AfterFC.png).  
I don’t know clearly, What’s the issue.

Please check it and tell me what is the issue and also suggest me to solve it.

Thanks,  
Riyaz

---

<div class="post-metadata">

**Author:** ![Emil](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/emil/32/19043_2.png) [@Emil](https://community.thinkgeo.com/u/Emil)\
**Post date:** [April 7, 2017, 5:14am UTC](https://community.thinkgeo.com/t/font-textstyle-getting-problem-using-slitcontainer/8492/4 "2017-04-07T05:14:09Z")

</div>

Hi Riyaz,

I’m sorry, I can’t recreate your issue on my side with your information.

I don’t have the font file you use, it looks I can search many similar fonts from internet.

I guess “split Container” represents the control system.Windows.Forms.SplitContainer, and the following code maybe used by your program:

```
this.splitContainer1.Panel1.Controls.Add(this.winformsMap1);

```

Without seeding what you were doing, it’s pretty difficult to pin it down.  
Could you please upload a code sample with your test data, so we can reproduce this issue and work for it.

Thanks,  
Emil
