Click here to Skip to main content
15,919,422 members
Home / Discussions / C#
   

C#

 
QuestionHow to use arrays as properties of a class? Pin
dnahelix5-Jul-07 18:16
dnahelix5-Jul-07 18:16 
AnswerRe: How to use arrays as properties of a class? Pin
Leslie Sanford5-Jul-07 18:49
Leslie Sanford5-Jul-07 18:49 
AnswerRe: How to use arrays as properties of a class? Pin
andre_swnpl5-Jul-07 18:54
andre_swnpl5-Jul-07 18:54 
AnswerRe: How to use arrays as properties of a class? Pin
Nouman Bhatti5-Jul-07 20:02
Nouman Bhatti5-Jul-07 20:02 
GeneralThanks a million for your kind help Pin
dnahelix5-Jul-07 20:19
dnahelix5-Jul-07 20:19 
AnswerRe: How to use arrays as properties of a class? Pin
Luc Pattyn6-Jul-07 0:37
sitebuilderLuc Pattyn6-Jul-07 0:37 
Questionhow to reuse combox Pin
lockepeak5-Jul-07 18:01
lockepeak5-Jul-07 18:01 
AnswerRe: how to reuse combox [modified] Pin
Martin#5-Jul-07 19:48
Martin#5-Jul-07 19:48 
Hello,

The point is that you can only have access to public members of your mainwindow from your childwindow.
But only if you have the reference of the mainwindow in the childwindow.
Using static fields is not good style, for that problem, but can be usefull in other tasks.

You could pass the reference of mainwindow to the childwindow over the childwindows constructor, or a property.
As it i bad style to make the whole combobox public, you should create methods or properties in your mainwindow, which return the informations you need.
Like:
public string PrinterNameText
{
    get
    {
        if(axPageLayoutControl1!=null)
        {
            return axPageLayoutControl1.Text;
        }
        return string.Empty;
    }
}


An other solution would be, using delegates.
There you have the luck, that Colin Angus Mackay wrote this fine article[^], which will help you.
Actually, there is also the child to parent connection over the reference, explaint.

All the best,

Martin


-- modified at 1:54 Friday 6th July, 2007
AnswerRe: how to reuse combox Pin
Nouman Bhatti5-Jul-07 20:03
Nouman Bhatti5-Jul-07 20:03 
QuestionDetermine Collection Type at run time Pin
xdavidx5-Jul-07 16:15
xdavidx5-Jul-07 16:15 
AnswerRe: Determine Collection Type at run time Pin
Christian Graus5-Jul-07 16:16
protectorChristian Graus5-Jul-07 16:16 
GeneralRe: Determine Collection Type at run time Pin
xdavidx5-Jul-07 16:21
xdavidx5-Jul-07 16:21 
GeneralRe: Determine Collection Type at run time Pin
Vikram A Punathambekar5-Jul-07 17:51
Vikram A Punathambekar5-Jul-07 17:51 
QuestionMemory Debugging Tools Pin
vineas5-Jul-07 14:27
vineas5-Jul-07 14:27 
Questioncrystal report problem Pin
rmedo5-Jul-07 12:20
rmedo5-Jul-07 12:20 
QuestionDecrypt but not Encrypt Pin
linal5-Jul-07 11:06
linal5-Jul-07 11:06 
AnswerRe: Decrypt but not Encrypt Pin
Nicholas Cardi5-Jul-07 11:33
Nicholas Cardi5-Jul-07 11:33 
AnswerRe: Decrypt but not Encrypt Pin
dino20945-Jul-07 13:15
dino20945-Jul-07 13:15 
GeneralRe: Decrypt but not Encrypt Pin
linal5-Jul-07 13:36
linal5-Jul-07 13:36 
GeneralRe: Decrypt but not Encrypt Pin
dino20946-Jul-07 7:50
dino20946-Jul-07 7:50 
GeneralRe: Decrypt but not Encrypt Pin
linal6-Jul-07 7:56
linal6-Jul-07 7:56 
GeneralRe: Decrypt but not Encrypt Pin
dino20946-Jul-07 9:04
dino20946-Jul-07 9:04 
GeneralRe: Decrypt but not Encrypt Pin
mav.northwind6-Jul-07 9:06
mav.northwind6-Jul-07 9:06 
QuestionBinding with an intermediate table Pin
Richard Blythe5-Jul-07 10:27
Richard Blythe5-Jul-07 10:27 
QuestionTele-operated robotic arm need help in programming Pin
koool_faysie5-Jul-07 9:14
koool_faysie5-Jul-07 9: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.