Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
TButtonComboBox - DropDownWidth property |
Wed, Apr 25 2018 3:27 AM | Permanent Link |
Paul Coshott | Hi All,
I need to simulate a button menu, so I put a button next to a TButtonComboBox, which works and looks really good, except for the drop down width. The TButtonComboBox component width is only 33, but I need the drop down menu to be much wider. Is there any way to do this? Thanks, Paul |
Wed, Apr 25 2018 11:40 AM | Permanent Link |
Uli Becker | Paul,
> Is there any way to do this? This is the code in "webedits.wbs" which is responsable for that: procedure TComboListControl.DoOpen(APosition: TDropDownPosition; AItemCount: Integer; const AText: String); {$IFNDEF DESIGN} var TempControl: TControl; TempSurface: TControl; {$ENDIF} begin {$IFNDEF DESIGN} BeginUpdate; try TempControl:=TControl(Owner); TempSurface:=TempControl.GetSurface; Parent:=TempSurface; Width:=TempControl.Width; Height:=((Min(AItemCount,Items.Count)*ItemHeight)+(Height-ClientHeight)); case APosition of dpRelative: begin Left:=TempControl.SurfaceLeft; Top:=(TempControl.SurfaceTop+TempControl.Height); { Make sure that the drop down list fits on the surface } if ((Top+Height) > TempSurface.Height) then Top:=((Top-TempControl.Height)-Height); end; dpSurfaceCenter: Layout.Position:=lpCenter; end; DoNearFind(AText); BringToFront; Show; finally EndUpdate; { We want to set focus *after* everything is updated !!! } SetFocus; end; {$ENDIF} end; You would have to modify this line: Width:=TempControl.Width; Or create a custom control which is able to control the width of the list item. Cheers Uli |
Wed, Apr 25 2018 11:47 AM | Permanent Link |
Uli Becker | Addition: why don't you just use a listbox control next to the button?
|
This web page was last updated on Thursday, October 10, 2024 at 02:11 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |