---
title: "Text box with long text get two rows"  
description: "Text box with long text get two rows"  
author: "Anonymous User"  
published: 2014-03-26  
updated: 2014-03-26  
canonical: https://www.mindstick.com/forum/1991/text-box-with-long-text-get-two-rows  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Text box with long text get two rows

I am using [drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) from list box to text box and the [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) when the [item](https://www.mindstick.com/forum/156564/remove-item-in-an-array-in-javascript)([string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp)) is too long and I drag it to text box I see just the [end](https://yourviews.mindstick.com/view/88503/us-iran-war-live-updates-trump-says-us-in-no-rush-to-end-iran-war) of the text which was dragged and I see it in 2 rows ,how can I change it that when the [long text](https://www.mindstick.com/forum/33993/how-to-wrap-long-text-in-a-table-cell-without-custom-cell) is dragged to see the start of it if its bigger than the text box.

## Replies

### Reply by Pravesh Singh

Hi Jeet,\

Try this code. This may help you.

```
    bool isTextDropped= false;    void textBox_Drop(object sender, DragEventArgs e)    {        string tstring;        tstring = e.Data.GetData(DataFormats.StringFormat).ToString();        textBox.Text += " " + tstring;        isTextDropped = true;      }           void textBox_TextChanged(object sender, TextChangedEventArgs e)    {        if (isTextDropped)        {           
textBox.SelectionStart = 0;           
textBox.SelectionLength = 0;           
isTextDropped = false;        }    }
```


---

Original Source: https://www.mindstick.com/forum/1991/text-box-with-long-text-get-two-rows

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
