gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] If you are online - passing a string array to subroutine


From: richard terry
Subject: [Gnumed-devel] If you are online - passing a string array to subroutine
Date: Wed, 12 Jun 2002 19:33:51 +1000

I made a class for the prompts on the edit panel:

class EditPromptsAllergies(wxPanel):
    def __init__(self,parent,id):
        wxPanel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize, 
wxSIMPLE_BORDER )       
         etc
       self.sizer = wxGridSizer(6, 1, 2, 2)  # rows, cols, hgap, vgap
        lbl_date = wxStaticText(self,-1," 
Date",wxDefaultPosition,wxDefaultSize,style = wxALIGN_LEFT)

Now I need to genericize it (if that is a word). I want to be able to pass 
down to it an array of text "label1,label2...labeln", and then construct the 
grid sizer with n columns (instead of 6 here), and jsut create n number of 
wxStaticText labels and add the correct label to it. so I can use the routine 
for all the prompts in all sections.

Any clues.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]