1

Closed

View/change extended properties of form control at design and runtime

description

I created a windows form. All the controls print except a FlowLayout control that I programmatically added label controls. I think I need to change MCL Form Print properties (Print on Form = True) on the labels I added the FlowLayout control. How can I access the MCL Form Print properties at design(code window) and runtime. When I'm in debug mode I can't see them. I can only see them when I'm visually designing the form thru the properties window. Here is the code to add the labels to the FlowLayout control:
 
Dim mylabel As Label
        Dim y As Integer = 30
        Dim trow As Integer = 0
 
        For Each mystring As String In tests
            mylabel = New Label()
            With mylabel
                .Width = 150
                .Location = New Point(10, y)
                .Text = mystring
            End With
            y += 30
            trow = trow + 1
            Me.FlowLayoutPanel1.Controls.Add(mylabel)
 
Thank you
Closed Mar 2, 2010 at 12:51 PM by Merrion
You would need to use the Component.SetPrint(control, value) method

comments

Merrion wrote Feb 23, 2010 at 12:32 PM

To set an extended property at run time you need to call the compontent's SetPropertyname() method - for example to set Print to True for the new label you created above you need to do:

FormprintComponent1.SetPrint(myLabel, True)

wrote Mar 2, 2010 at 12:51 PM

wrote Feb 13, 2013 at 6:44 PM

wrote May 15, 2013 at 11:54 PM