Click here to Skip to main content
15,902,894 members
Home / Discussions / C#
   

C#

 
GeneralRe: Why does the DataTable get strings do not exceed 255 characters ? Pin
Member 245846730-Jul-18 16:11
Member 245846730-Jul-18 16:11 
AnswerRe: Why does the DataTable get strings do not exceed 255 characters ? Pin
jschell30-Jul-18 13:02
jschell30-Jul-18 13:02 
GeneralRe: Why does the DataTable get strings do not exceed 255 characters ? Pin
Gerry Schmitz31-Jul-18 12:58
mveGerry Schmitz31-Jul-18 12:58 
GeneralRe: Why does the DataTable get strings do not exceed 255 characters ? Pin
jschell19-Aug-18 6:06
jschell19-Aug-18 6:06 
AnswerRe: Why does the DataTable get strings do not exceed 255 characters ? Pin
Gerry Schmitz31-Jul-18 13:01
mveGerry Schmitz31-Jul-18 13:01 
Questionc# Stream reader text file split line into first side int, and the other side string Pin
Member 1392985029-Jul-18 4:16
Member 1392985029-Jul-18 4:16 
AnswerRe: c# Stream reader text file split line into first side int, and the other side string Pin
OriginalGriff29-Jul-18 6:09
mveOriginalGriff29-Jul-18 6:09 
QuestionCustom control not visible on parent control Pin
Ömer3328-Jul-18 11:30
Ömer3328-Jul-18 11:30 
Hi...I really need help for a runtime bug.
I have made a custom panel and custom textbox with some properties and one method.
Both Classes(panel and textbox) have one public method called AddMe, witch will add panel to the splitcontainer on form1 and textbox on panel.
My problem is that, at first it worked just fine, panel was added to the splitcontainer and textbox was added to panel. But after i added a second textbox witch also was gonna be added to panel, then the first textbox wont show anymore, nor the the second textbox. I did´nt make the big change on the code. I try to remove the referrence to the second textbox, but nothing helped.
Hope anyone can help...Best regards...

Here is the sourecode...

private void InitializeInputPanel()
  {
      InputPanel.Width = PnlWidth;
      InputPanel.Height = Pnlheight;
      InputPanel.BackColor = pnlbackgroundcolor;
      InputPanel.BorderStyle = Pnlborderstyle;
      InputPanel.Font = Pnlfont;
      InputPanel.Dock = Pnldockstyle;
      InputPanel.Location = PnlPoint;

 InpbBeskrivelseTxtBox inpb = new InpbBeskrivelseTxtBox();
      inpb.AddMe(InputPanel);

  }




class InpbBeskrivelseTxtBox
{
    TextBox BeskrivelseTextBox =new TextBox();
    #region Fields
    private int txtwidth;
    private int txtheight;
    private Color txtbackgroundcolor;
    private BorderStyle txtborderstyle;
    private Font txtfont;
    private DockStyle txtdockstyle;
    private Point txtpoint;
    private string txtText;
    private HorizontalAlignment txtAlign;
    #endregion
    #region Constructors
    public void InpbBeskrivelseTextbox()
    {
        txtwidth = 321;
        txtheight = 21;
        txtbackgroundcolor = Color.Red;
        txtborderstyle = BorderStyle.Fixed3D;
        txtfont=new Font("Century",8);
        txtdockstyle = DockStyle.Top;
        txtpoint = new Point(0, 0);
        txtText = "Beskrivelse";
        TxtAlign = HorizontalAlignment.Center;

    }
    #endregion
    #region properties
    public int Txtwidth { get => txtwidth; set => txtwidth = value; }
    public int Txtheight { get => txtheight; set => txtheight = value; }
    public Color Txtbackgroundcolor { get => txtbackgroundcolor; set => txtbackgroundcolor = value; }
    public BorderStyle Txtborderstyle { get => txtborderstyle; set => txtborderstyle = value; }
    public Font Txtfont { get => txtfont; set => txtfont = value; }
    public DockStyle Txtdockstyle { get => txtdockstyle; set => txtdockstyle = value; }
    public Point Txtpoint { get => txtpoint; set => txtpoint = value; }
    public string TxtText { get => txtText; set => txtText = value; }
    public HorizontalAlignment TxtAlign { get => txtAlign; set => txtAlign = value; }
    #endregion
    #region Private Methods
    private void InitializebeskrivelsesTextBox()
    {
        BeskrivelseTextBox.Width = Txtwidth;
        BeskrivelseTextBox.Height = Txtheight;
        BeskrivelseTextBox.BackColor = Txtbackgroundcolor;
        BeskrivelseTextBox.BorderStyle = Txtborderstyle;
        BeskrivelseTextBox.Font = Txtfont;
        BeskrivelseTextBox.Dock = Txtdockstyle;
        BeskrivelseTextBox.Location = Txtpoint;
        BeskrivelseTextBox.Text = TxtText;
        BeskrivelseTextBox.TextAlign = TxtAlign;
        BeskrivelseTextBox.BringToFront();
    }
    #endregion
    #region Public Methods
    public void AddMe(Control control)
    {

        InitializebeskrivelsesTextBox();
        control.Controls.Add(BeskrivelseTextBox);
    }
    #endregion
}

AnswerRe: Custom control not visible on parent control Pin
Luc Pattyn28-Jul-18 13:17
sitebuilderLuc Pattyn28-Jul-18 13:17 
AnswerRe: Custom control not visible on parent control Pin
OriginalGriff28-Jul-18 20:24
mveOriginalGriff28-Jul-18 20:24 
AnswerRe: Custom control not visible on parent control Pin
Gerry Schmitz31-Jul-18 13:19
mveGerry Schmitz31-Jul-18 13:19 
Questionread text file online c# Pin
Luiz Carlos27-Jul-18 9:40
Luiz Carlos27-Jul-18 9:40 
AnswerRe: read text file online c# Pin
Dave Kreskowiak27-Jul-18 13:47
mveDave Kreskowiak27-Jul-18 13:47 
AnswerRe: read text file online c# Pin
OriginalGriff27-Jul-18 20:19
mveOriginalGriff27-Jul-18 20:19 
GeneralRe: read text file online c# Pin
Gerry Schmitz28-Jul-18 8:00
mveGerry Schmitz28-Jul-18 8:00 
QuestionGetting first paragraph of wikipedia using Voice C# Pin
Wishingchain26-Jul-18 20:58
Wishingchain26-Jul-18 20:58 
AnswerRe: Getting first paragraph of wikipedia using Voice C# Pin
Pete O'Hanlon26-Jul-18 22:45
mvePete O'Hanlon26-Jul-18 22:45 
GeneralRe: Getting first paragraph of wikipedia using Voice C# Pin
Wishingchain26-Jul-18 23:57
Wishingchain26-Jul-18 23:57 
AnswerRe: Getting first paragraph of wikipedia using Voice C# Pin
Eddy Vluggen27-Jul-18 0:06
professionalEddy Vluggen27-Jul-18 0:06 
GeneralRe: Getting first paragraph of wikipedia using Voice C# Pin
Wishingchain27-Jul-18 18:04
Wishingchain27-Jul-18 18:04 
GeneralRe: Getting first paragraph of wikipedia using Voice C# Pin
Eddy Vluggen27-Jul-18 23:47
professionalEddy Vluggen27-Jul-18 23:47 
GeneralRe: Getting first paragraph of wikipedia using Voice C# Pin
Wishingchain28-Jul-18 1:03
Wishingchain28-Jul-18 1:03 
GeneralRe: Getting first paragraph of wikipedia using Voice C# Pin
Eddy Vluggen28-Jul-18 1:27
professionalEddy Vluggen28-Jul-18 1:27 
AnswerRe: Getting first paragraph of wikipedia using Voice C# Pin
CP_Member88829-Jul-18 19:25
CP_Member88829-Jul-18 19:25 
QuestionPlotting a line graph in c# and retaining the previous graphs. Pin
Dipk1123-Jul-18 0:51
Dipk1123-Jul-18 0:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.