Cannot set the width of uploader

Mar 6, 2009 at 7:45 AM
Hello,

I am using Flajaxian Uploader inside one of my content pages:

        <fieldset>
            <legend>Upload File</legend>
                <fjx:FileUploader runat="server" ID="fileUploaderExcel" AllowedFileTypes="Excel 2000-2003:*.xls; ZIP Files:*.zip" 
                 MaxNumberFiles="1"
                 OnFileReceived="fileUploaderExcel_FileReceived" EnableViewState="false" Visible="false" >
                <Adapters>
                    <fjx:FileSaverAdapter />
                </Adapters>
                </fjx:FileUploader>  
</fieldset>

It works fine, and renders correctly as long as I am not changing width property. When I am trying to do it, it does not position correctly. It adds some strange margin on the left. Can anyone provide the sample how to extend default width of flajaxian uploader?
Coordinator
Mar 6, 2009 at 11:32 AM
This is because when you change the with property of object HTML element without recompiling Flash Swf file it centers the current elements instead of having them left aligned. In other words if you want to change the Width you have to reposition UI elements too. This is unfortunate but that's the way Flash works. Here's one example:

<fjx:FileUploader ID="FileUploader1" runat="server" 
                              Width="205"
                              Height="40" 
                              BrowseButtonX="24"
                              BrowseButtonY="15"
                              BrowseButtonWidth="70"
                              BrowseButtonHeight="24"
                              UploadButtonX="93"
                              UploadButtonY="15"
                              UploadButtonWidth="70"
                              UploadButtonHeight="24"
                              CancelButtonX="162"
                              CancelButtonY="15"
                              CancelButtonWidth="70"
                              CancelButtonHeight="24"
                              ProgressBarX="24"
                              ProgressBarY="1"
                              ProgressBarWidth="202"
                              ProgressBarHeight="11"
                                >
...
</fjx:FileUploader>

Play with it to get the exact numbers for you.