Click here to Skip to main content
15,911,035 members
Home / Discussions / C#
   

C#

 
AnswerRe: Access Controls from another class Pin
Colin Angus Mackay4-Feb-06 15:22
Colin Angus Mackay4-Feb-06 15:22 
QuestionRe: Access Controls from another class Pin
tray_gator4-Feb-06 22:51
tray_gator4-Feb-06 22:51 
AnswerRe: Access Controls from another class Pin
mav.northwind4-Feb-06 23:52
mav.northwind4-Feb-06 23:52 
QuestionRe: Access Controls from another class Pin
tray_gator5-Feb-06 0:41
tray_gator5-Feb-06 0:41 
AnswerRe: Access Controls from another class Pin
kasik5-Feb-06 1:28
kasik5-Feb-06 1:28 
AnswerRe: Access Controls from another class Pin
tray_gator5-Feb-06 2:04
tray_gator5-Feb-06 2:04 
AnswerRe: Access Controls from another class Pin
mav.northwind5-Feb-06 3:07
mav.northwind5-Feb-06 3:07 
GeneralRe: Access Controls from another class Pin
tray_gator5-Feb-06 4:22
tray_gator5-Feb-06 4:22 
Thanks for answer, I think its better way too.
I dont know why, but by me that dont works...
I do so:
class Form1
{
    private comboBox comboBox1; //its visible
    protected string _choices;
    public string[] Choices
    {
        get  {  return _choices;  }
        set
        {
            _choices = value;
            comboBox1.DataSource = value;
        }
    }
    public void someFunctionInForm1
    {
         Class1 cls1 = new Class1();
         cls1.test();
    }
}
class Class1
{
    public void test()
    {
        Form1 frm1 = new Form1();
        frm1.Choices = new string {"aaa", "bbb"}; // dont work
    }
}

If I make the same from Form1 class:
...somewhere in Form1
Choices = new string[] {"ccc", "ddd"}; // Works

all works, but when I do this in Class1 (like above) - dont work.
GeneralRe: Access Controls from another class Pin
kasik5-Feb-06 4:57
kasik5-Feb-06 4:57 
GeneralRe: Access Controls from another class Pin
tray_gator5-Feb-06 6:04
tray_gator5-Feb-06 6:04 
GeneralRe: Access Controls from another class Pin
Colin Angus Mackay5-Feb-06 10:42
Colin Angus Mackay5-Feb-06 10:42 
GeneralRe: Access Controls from another class Pin
tray_gator5-Feb-06 22:05
tray_gator5-Feb-06 22:05 
Questionjoining the server with my application Pin
moonangel_bio4-Feb-06 7:39
moonangel_bio4-Feb-06 7:39 
AnswerRe: joining the server with my application Pin
Colin Angus Mackay4-Feb-06 15:18
Colin Angus Mackay4-Feb-06 15:18 
General[Message Deleted] Pin
emran8344-Feb-06 19:48
emran8344-Feb-06 19:48 
GeneralRe: joining the server with my application Pin
Colin Angus Mackay4-Feb-06 23:45
Colin Angus Mackay4-Feb-06 23:45 
GeneralRe: joining the server with my application Pin
moonangel_bio5-Feb-06 1:42
moonangel_bio5-Feb-06 1:42 
GeneralRe: joining the server with my application Pin
Colin Angus Mackay5-Feb-06 1:51
Colin Angus Mackay5-Feb-06 1:51 
GeneralRe: joining the server with my application Pin
Dave Kreskowiak5-Feb-06 5:04
mveDave Kreskowiak5-Feb-06 5:04 
GeneralRe: joining the server with my application Pin
emran8345-Feb-06 10:34
emran8345-Feb-06 10:34 
GeneralRe: joining the server with my application Pin
Colin Angus Mackay5-Feb-06 10:46
Colin Angus Mackay5-Feb-06 10:46 
GeneralRe: joining the server with my application Pin
emran8345-Feb-06 11:15
emran8345-Feb-06 11:15 
GeneralRe: joining the server with my application Pin
emran8345-Feb-06 17:28
emran8345-Feb-06 17:28 
GeneralRe: joining the server with my application Pin
Colin Angus Mackay5-Feb-06 22:11
Colin Angus Mackay5-Feb-06 22:11 
Questioncomponent property in designer Pin
_Liron_4-Feb-06 5:30
_Liron_4-Feb-06 5:30 

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.