Home > database >  Pb in how to use the code to cancel the listbox has selected option, is to remove the blue bar
Pb in how to use the code to cancel the listbox has selected option, is to remove the blue bar

Time:09-19

As title, check for a long time, it is. NET listbox usage, consult how to use the code in the pb cancel listbox has selected option, is to remove the blue article
- if you can also add cent be settled as soon as possible

CodePudding user response:

Help you find the along while

The Description

Sets the highlighted the state of an item in a list box. The SetState is only applicable to a list box control whose MultiSelect property is set to true.

Controls,

ListBox and PictureListBox controls,

Syntax

Listboxname. SetState (index, state)

Argument Description
Listboxname The name of The ListBox or PictureListBox in which you want to set The state (highlighted The or not highlighted) for an item. The MultiSelect property for The control must be set to true.
Index, The number of The item for which you want to set The state. Specify 0 to set The state of all The items in The ListBox.
State A Boolean value that determines the state of the item:? TRUE - Selected? FALSE - the Not selected
The Return value

Integer. Returns 1 if it succeeds and 1 if an error occurs. If any argument 's value is null, SetState Returns null.

The Usage

When the MultiSelect property for the control is false, use SelectItem, home SetState, to select one item at a time.

CodePudding user response:

Listboxname. SetState (index, state)

This should be able to meet you


If you did not set the alternative, this could not used (not testing), you can consider to delete the selected item and then add,

CodePudding user response:

The moderator is enthusiastic, classmates
  • Related