Jump to content

Need support for Flex


bindu.nvn

Recommended Posts

If u have u r dataprovider for the combo box code looks like this

<mx:Array id="arr">
        <mx:Object label="One" />
        <mx:Object label="Two" />
        <mx:Object label="Three" />
        <mx:Object label="Four" />
        <mx:Object label="Five" />
        <mx:Object label="Six" />
        <mx:Object label="Seven" />
        <mx:Object label="Eight" />
        <mx:Object label="Nine" />
        <mx:Object label="Ten" />
    </mx:Array>

    <mx:ApplicationControlBar dock="true">
        <mx:Form styleName="plain">
            <mx:FormItem label="selectionColor:">
                <mx:ColorPicker id="colorPicker"
                        selectedColor="#CCCCCC" />
            </mx:FormItem>
        </mx:Form>
    </mx:ApplicationControlBar>

    <mx:ComboBox id="comboBox"
            dataProvider="{arr}"
            selectionColor="{colorPicker.selectedColor}" />

Link to comment
Share on other sites

There are several ways... here's another one. It requires that your pictures are
stored in the same folder as your app. That's easily changed. Just add path
info to the filename you pass to the sub.
Drop a combobox and image control on a new form and run this....


Option Explicit

Private msFileNames() As String

Private Sub Form_Load()
ReDim msFileNames(0)
'Add your items
Call AddAnItem("Jane Doe", "janedoe.jpg")
Call AddAnItem("John Doe", "johndoe.jpg")
End Sub

Private Sub Combo1_Click()
Set Image1.Picture = LoadPicture(msFileNames(Combo1.ListIndex))
End Sub

Private Sub AddAnItem(ComboText As String, FileName As String)
Dim iItemIndex As Integer

With Combo1
.AddItem ComboText
iItemIndex = .NewIndex
If iItemIndex > UBound(msFileNames) Then
ReDim Preserve msFileNames(iItemIndex)
End If
msFileNames(iItemIndex) = FileName
End With

End Sub

Link to comment
Share on other sites

You should checkout [url=http://www.stackoverflow.com]www.stackoverflow.com[/url] ... Post your question there and paste the link here !!
[quote author=bindu.nvn link=topic=144157.msg1648544#msg1648544 date=1295191872]
Need support in Flex.....Its urgent
[/quote]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...