Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListBox missing SetCurSel event #7

Closed
GirkovArpa opened this issue Apr 5, 2021 · 2 comments
Closed

ListBox missing SetCurSel event #7

GirkovArpa opened this issue Apr 5, 2021 · 2 comments
Assignees
Labels
bindings Something with the low-level WinAPI bidings enhancement New feature or request
Milestone

Comments

@GirkovArpa
Copy link

The event is missing from the list in the documentation:

https://rodrigocfd.github.io/winsafe/winsafe/msg/lb/index.html

But it's in the Microsoft documentation:

https://docs.microsoft.com/en-us/windows/win32/controls/lb-setsel

I think it should look something like this:

winsafe::msg::lb::SetCurSel { 
  select: bool, 
  index: u32
}

Without it, there's no guaranteed way to uniquely select an item by index. SelectString can be used to select the first item beginning with a certain string, but fails to select Hello if that item is preceded by Hello World!.

Correct me if I'm wrong ...

@GirkovArpa
Copy link
Author

SelectString takes an index to begin the search in addition to a string prefix, so it can accomplish the same thing.

@rodrigocfd rodrigocfd self-assigned this Apr 5, 2021
@rodrigocfd rodrigocfd added the enhancement New feature or request label Apr 5, 2021
@rodrigocfd
Copy link
Owner

Just for the record, it's there now:

https://rodrigocfd.github.io/winsafe/winsafe/msg/lb/struct.SetSel.html

@rodrigocfd rodrigocfd added this to the v0.0.3 milestone Apr 5, 2021
@rodrigocfd rodrigocfd added the bindings Something with the low-level WinAPI bidings label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bindings Something with the low-level WinAPI bidings enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants