Control expand/collapse in TAdvSmoothListBox

Hi,

I am heavily using TAdvSmoothListBox as my main application control and have leveled items as a menu. The automatic expand/collapse using GraphicLeft works nicely, yet I have situations where I don't want to allow collapsing, especially when an item in the group is the active one. So far I couldn't find the event that is triggered when expand/collapse is active - any hints? I was assuming this works similar to the "Allow" parameter of "onItemDeleteClicked", but no success so far.

BTW: is it possible to localize the caption of the red "Delete" button? I have my interface currently in German and English, but the button is always in English.

Thanks for any help,
Matthias

Found a solution, maybe interesting for someone else as well. This takes into account that the app window is not in top/left corner, the smoothPopup is alway to the right of the Listbox and either above or below the item clicked (depending on pos relative to the top).


procedure TFORM_Main.ASLBOX_MainMenuItemDeleteClicked(Sender: TObject;
  Item: TAdvSmoothListBoxItem; var Allow: Boolean);
var
  mBar: TAdvSmoothListBox;
  relIdx, relTop: integer;
  absPos : TWindowPlacement;
  absRect: TRect;
begin
  mbar := Sender as TAdvSmoothListBox;
  //--  get the position on screen for smoothPopup display.
  relIdx := 0;
  try
    while mbar.Items[mbar.GetTopIndex+relIdx] <> Item do
      inc (relIdx);
    relTop := relIdx * mbar.ItemAppearance.Height;
    if relTop > ASPOPUP_ConfirmDelete.Height then begin
      ASPOPUP_ConfirmDelete.ArrowPosition := paLeftBottom;
      dec (relTop, ASPOPUP_ConfirmDelete.Height - mbar.ItemAppearance.Height);
    end else begin
      ASPOPUP_ConfirmDelete.ArrowPosition := paLeftTop;
    end;
    absPos.Length := SizeOf(TWindowPlacement);
    GetWindowPlacement(Self.Handle, @absPos);
    absRect := absPos.rcNormalPosition;
    ASPOPUP_ConfirmDelete.PopupAt (  absRect.Left + mbar.Left + mbar.Width
                                   , absRect.Top + relTop);
  finally
    //--  never allow delete, smoothPopup buttons handled outside.
    Allow := false;
  end;

Still don't know how to change the caption on the "Delete" button.

Enjoy.

Ooops - was for another issue I had - the correct positioning with a flexible above/below the "Delete" button...

There is currently no event with which expand/collaps can be prevented. This is an interesting suggestion though
that we'll consider to add in a future update.
The "Delete" caption is currently not customizable. We'll make this customizable in the next update as well.