zoukankan      html  css  js  c++  java
  • TCustomCombo.SetItemIndex(const Value: Integer);

    procedure TCustomCombo.SetItemIndex(const Value: Integer);
    begin
    if csLoading in ComponentState then
    FItemIndex := Value
    else
    if GetItemIndex <> Value then
    SendMessage(Handle, CB_SETCURSEL, Value, 0);
    end;

    CB_SETCURSEL message

    An application sends a CB_SETCURSEL message to select a string in the list of a combo box. If necessary, the list scrolls the string into view. The text in the edit control of the combo box changes to reflect the new selection, and any previous selection in the list is removed.

    Parameters

    wParam

    Specifies the zero-based index of the string to select. If this parameter is -1, any current selection in the list is removed and the edit control is cleared.

    lParam

    This parameter is not used.

    Return value

    If the message is successful, the return value is the index of the item selected. If wParam is greater than the number of items in the list 实际测试,超过时,之前的选择不会被清除or if wParam is -1, the return value is CB_ERR and the selection is cleared.

    Requirements

  • 相关阅读:
    回发保留前台添加的html
    关于NBear数据访问层IDData
    使用js把数字转化成会计格式
    二次注入
    .htaccess利用与Bypass方式总结
    HTTPoxy漏洞(CVE-2016-5385)
    JAVA并行程序基础一
    队列-数组实现
    Vuex
    稀疏数组
  • 原文地址:https://www.cnblogs.com/CodeGear/p/11944594.html
Copyright © 2011-2022 走看看