Control FlexForm size?

Can I control the size of the flexform?

and, what means by

  • wpf_params ( kwargs ) – Additional WPF attributes
    what kind of parameters are they?

since the FlexFrom is a WPF Window, you could try adding Width=800 and Height=600 in the constructor of the form, like
form = FlexForm('Title', components, Width=800, Height=600)
I haven’t tried it but this should work.

1 Like

no it didn’t work :frowning: :frowning:

not my strong side here

the FlexForm is set to
by default in the rpw implementation

I did not see an attribute implementation in there

you could use the WPFwindow implementation from pyrevit to get there and set in the xaml file that defines your window or directly un the python code defining the layout

Example adapted from the sample in the forms module of pyRevit:

from pyrevit import forms
layout = '<Window ' \
         'xmlns="" ' \
         'xmlns:x="" ' \
         'ShowInTaskbar="False" ResizeMode="NoResize" ' \
         'WindowStartupLocation="CenterScreen" ' \
         'HorizontalContentAlignment="Center">' \
w = forms.WPFWindow(layout, literal_string=True)
1 Like