Click here to Skip to main content
15,891,372 members
Home / Discussions / C#
   

C#

 
QuestionInteract with Java Applet using C#.net Pin
Vanitha Sivakumar11-Jun-08 1:54
Vanitha Sivakumar11-Jun-08 1:54 
AnswerRe: Interact with Java Applet using C#.net Pin
Abhijit Jana11-Jun-08 2:09
professionalAbhijit Jana11-Jun-08 2:09 
Questionextracting file from a path Pin
shriya_1711-Jun-08 1:41
shriya_1711-Jun-08 1:41 
AnswerRe: extracting file from a path Pin
Vasudevan Deepak Kumar11-Jun-08 1:47
Vasudevan Deepak Kumar11-Jun-08 1:47 
Generalextracting file from a path Pin
shriya_1711-Jun-08 1:54
shriya_1711-Jun-08 1:54 
AnswerRe: extracting file from a path Pin
User 665811-Jun-08 2:23
User 665811-Jun-08 2:23 
GeneralRe: extracting file from a path Pin
shriya_1711-Jun-08 3:32
shriya_1711-Jun-08 3:32 
QuestionCustom Windows Controls Pin
Gktony11-Jun-08 1:20
Gktony11-Jun-08 1:20 
Hi all,

I am developing some custom windows controls and I want every control to be resized when used on the windows form. For example if there is a text box the user can extend the length by just extendeing the legnth of the control. I cannot do this succesfully at then moment I have tried to set AutoSize to true and the AutoSizeMode to GrowAndShrink but it doesn't work.

Do you have any examples?

Thanks in Advance

Tony

Here is my code for the control

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;


namespace UserControls.UIControls
{
public partial class LabelledText : UserControl
{
public delegate void EventHandler(Object sender, EventArgs e);
public event EventHandler onGetFocus;
public event EventHandler onLostFocus;

public LabelledText()
{
InitializeComponent();
}

public string LabelText
{
get
{
return lbl.Text;
}
set
{
lbl.Text = value;
}
}
public ContentAlignment LabelAlign
{
get
{
return lbl.TextAlign;
}
set
{
lbl.TextAlign = value;
}
}
public string TextBoxText
{
get
{
return txt.Text;
}
set
{
txt.Text = value;
}
}
public HorizontalAlignment TextBoxAlign
{
get
{
return txt.TextAlign;
}
set
{
txt.TextAlign = value;
}
}
private void LabelledText_Load(object sender, EventArgs e)
{
txt.BackColor = System.Drawing.SystemColors.Control;
}

private void txt_Leave(object sender, EventArgs e)
{
txt.BackColor = System.Drawing.SystemColors.Control;
}

private void txt_Enter(object sender, EventArgs e)
{
txt.BackColor = System.Drawing.Color.White;
}
}
}
AnswerRe: Custom Windows Controls Pin
Abhijit Jana11-Jun-08 1:49
professionalAbhijit Jana11-Jun-08 1:49 
GeneralRe: Custom Windows Controls Pin
Gktony11-Jun-08 2:57
Gktony11-Jun-08 2:57 
AnswerRe: Custom Windows Controls Pin
eggsovereasy11-Jun-08 2:49
eggsovereasy11-Jun-08 2:49 
GeneralRe: Custom Windows Controls Pin
Gktony11-Jun-08 3:13
Gktony11-Jun-08 3:13 
GeneralRe: Custom Windows Controls Pin
eggsovereasy11-Jun-08 8:39
eggsovereasy11-Jun-08 8:39 
GeneralRe: Custom Windows Controls Pin
Gktony11-Jun-08 8:52
Gktony11-Jun-08 8:52 
QuestionHow to hide "Script" combobox in FontDialog Box Pin
Krishnraj11-Jun-08 0:53
Krishnraj11-Jun-08 0:53 
AnswerRe: How to hide "Script" combobox in FontDialog Box Pin
DaveyM6911-Jun-08 1:10
professionalDaveyM6911-Jun-08 1:10 
GeneralRe: How to hide "Script" combobox in FontDialog Box Pin
Krishnraj11-Jun-08 1:44
Krishnraj11-Jun-08 1:44 
AnswerRe: How to hide "Script" combobox in FontDialog Box Pin
Abhijit Jana11-Jun-08 1:53
professionalAbhijit Jana11-Jun-08 1:53 
AnswerRe: How to hide "Script" combobox in FontDialog Box Pin
Kjetil Svendsen11-Jun-08 1:11
Kjetil Svendsen11-Jun-08 1:11 
GeneralRe: How to hide "Script" combobox in FontDialog Box Pin
Krishnraj11-Jun-08 1:20
Krishnraj11-Jun-08 1:20 
AnswerRe: How to hide "Script" combobox in FontDialog Box Pin
Abhijit Jana11-Jun-08 1:26
professionalAbhijit Jana11-Jun-08 1:26 
Questionhow to assign auto tab function for tab index Pin
MS Lee10-Jun-08 23:39
MS Lee10-Jun-08 23:39 
AnswerRe: how to assign auto tab function for tab index Pin
dan!sh 10-Jun-08 23:45
professional dan!sh 10-Jun-08 23:45 
GeneralRe: how to assign auto tab function for tab index Pin
MS Lee11-Jun-08 0:01
MS Lee11-Jun-08 0:01 
QuestionEmpty datetimepicker Pin
thachil10-Jun-08 23:14
thachil10-Jun-08 23:14 

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.