Ticket Q106074
Visible to All Users

LookUpEdit PopUpWidth

created 17 years ago

I use VB.Net and I've been reading the post on the issue everyone is having, including me with trying to deal with PopUpWidth of the LookUpEdit Control.
I have version 8.1.4 and I can't seem to set the PopUpWidth less then 100
I have the following Code:
        Dim colList As LookUpColumnInfoCollection = Me.LookUpEdit1.Properties.Columns
        LinqServerModeSource1.QueryableSource = From cntry In mDC.vCustomerCountries _
                                                Order By cntry.Description _
                                                Select cntry.CountryID, cntry.Description
        Me.LookUpEdit1.Properties.DataSource = LinqServerModeSource1
        Me.LookUpEdit1.Properties.DisplayMember = "Description"
        Me.LookUpEdit1.Properties.ValueMember = "CountryID"
        Me.LookUpEdit1.Properties.ShowLines = True
        Me.LookUpEdit1.Properties.ShowFooter = False
        Me.LookUpEdit1.Properties.ShowHeader = False
        Me.LookUpEdit1.Properties.PopupWidth = 30
        Me.LookUpEdit1.Properties.ShowDropDown = ShowDropDown.Never
        Me.LookUpEdit1.Properties.NullText = String.Empty
        Me.LookUpEdit1.Properties.SearchMode = SearchMode.AutoComplete
        Me.LookUpEdit1.Properties.AutoSearchColumnIndex = 1
        ' Add two columns to the dropdown.
        ' A First Column to display the CountryID field's values.
        colList.Add(New LookUpColumnInfo("CountryID", "Country ID", 0, FormatType.None, String.Empty, False, HorzAlignment.Near))
        ' A Second Column to display the Description field's values.
        colList.Add(New LookUpColumnInfo("Description", "Description", 50, FormatType.None, String.Empty, True, HorzAlignment.Near))
Can you please tell me if you are going to add a new property to handel this automaticaly to the widh the the control itself. Such as (AutoPopUpWidth)
And can you please tell me if the (AutoHeight) is suppose to automaticaly set the height of the DropDown to show only the number of rows being displayed. It seems to be the what ever the (DropDownRows) is set to even if the data is less. Is this going to be fixed.
Thanks for a great product.
Andy

Comments (2)
DevExpress Support Team 17 years ago

    Hello Andy,
    Please give me additional time to research the problem a bit more. I'll provide you with answer as soon as possible.
    Thanks,
    George.

    DevExpress Support Team 17 years ago

      Hello Andy,
      Thanks for your question. If you need to implement the auto width functionality for a pop-up window, use the code below:

      Visual Basic
      Private Sub LookUpEdit1_Popup(ByVal sender As Object, ByVal e As System.EventArgs) Handles LookUpEdit1.Popup Dim Form As PopupLookUpEditForm = CType(CType(sender, IPopupControl).PopupWindow, PopupLookUpEditForm) Dim w As Integer = 0 For Each i As LookUpColumnInfo In CType(sender, LookUpEdit).Properties.Columns If i.Visible Then w += i.Width End If Next Form.Width = w End Sub

      To set the height of a pop-up window, use the DropDownRows property.
      I have attached a sample project, which demonstrates how to implement this. Please review it and let me know whether it Meets your requirements.
      Thanks,
      George.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.