PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 10
 11 
 on: July 02, 2020, 02:03:17 PM 
Started by Paul Squires - Last post by Josť Roca
See: https://github.com/JoseRoca/WinFBX/blob/master/docs/Windows%20GUI/CWindow%20Class.md#AfxInputBox

 12 
 on: July 02, 2020, 01:49:45 PM 
Started by Paul Squires - Last post by Bumblebee
I couldn't find it in the help file, I'm glad I found it here.

 13 
 on: June 29, 2020, 07:35:47 AM 
Started by Paul Squires - Last post by Bumblebee
I implemented your changes and the problem persists.
You should be able to observe a focus loss after an item is selected. I'm seeing this in several projects that don't involve the Ctx control.
On these windows it may be difficult to see since the focus trace line isn't visible on a list box item.

1. I select an item in the list box.
2. I press tab.
3. I notice I cannot select another item by pressing the arrow keys, or by rotating the mouse wheel. I notice that the tab control did not receive focus.
4. I press tab.
5. Focus is returned to the list box, as I can now do what I described in step 3.

This may be trivial for mouse users who click on everything, but for keyboard users this is weird.
I haven't created a test project but based on the sequence of steps in your post it makes sense that in #3 you cannot select another item by pressing arrow keys, etc because the focus would have already left the listbox control when you pressed the TAB key in step #2.

#1. Listbox item gets focus because you either selected it by code or by clicking on it.
#2. Pressing TAB will move the focus from the Listbox to whatever the next control is in the tab order.
#3. The Lisbox now does not have focus so you can't change items via keyboard. You mention tab control - you have a TabControl in your project? That wasn't in the sample project that you posted earlier.
#4. Pressing TAB probably moved the control back to the Listbox again (most likely from your PictureBox to the Listbox).
#5. Listbox has focus so you can change items via arrow keys.
I added a tab control, but it doesn't receive focus. I don't know if that is an issue.
If I create a form with a list box, text box and tab control, focus will not jump to the tab control.

On the project I submitted, the focus should never leave the list box. I'm assuming it is going to the image, and not the label.
The issue is similar that of the picture box control in Visual Basic. If enabled is true, a picture box will take the focus when tab is pressed.

See the attached project for another focus issue. Description is in the executable file.

 14 
 on: June 28, 2020, 04:21:30 PM 
Started by Paul Squires - Last post by Paul Squires
It appears that when the back color of an empty list box is changed, it will not show up, or will flicker.
Adding an item to the list box halts this behavior.
Thanks - I have added this to my to do list to check into.

 15 
 on: June 28, 2020, 04:20:40 PM 
Started by Paul Squires - Last post by Paul Squires
I implemented your changes and the problem persists.
You should be able to observe a focus loss after an item is selected. I'm seeing this in several projects that don't involve the Ctx control.
On these windows it may be difficult to see since the focus trace line isn't visible on a list box item.

1. I select an item in the list box.
2. I press tab.
3. I notice I cannot select another item by pressing the arrow keys, or by rotating the mouse wheel. I notice that the tab control did not receive focus.
4. I press tab.
5. Focus is returned to the list box, as I can now do what I described in step 3.

This may be trivial for mouse users who click on everything, but for keyboard users this is weird.
I haven't created a test project but based on the sequence of steps in your post it makes sense that in #3 you cannot select another item by pressing arrow keys, etc because the focus would have already left the listbox control when you pressed the TAB key in step #2.

#1. Listbox item gets focus because you either selected it by code or by clicking on it.
#2. Pressing TAB will move the focus from the Listbox to whatever the next control is in the tab order.
#3. The Lisbox now does not have focus so you can't change items via keyboard. You mention tab control - you have a TabControl in your project? That wasn't in the sample project that you posted earlier.
#4. Pressing TAB probably moved the control back to the Listbox again (most likely from your PictureBox to the Listbox).
#5. Listbox has focus so you can change items via arrow keys.

 16 
 on: June 28, 2020, 07:50:59 AM 
Started by Paul Squires - Last post by Bumblebee
It appears that when the back color of an empty list box is changed, it will not show up, or will flicker.
Adding an item to the list box halts this behavior.

Edit: This explains why I couldn't simulate a grayed out background in a list box yesterday. The list was empty.

 17 
 on: June 28, 2020, 07:35:49 AM 
Started by Paul Squires - Last post by Bumblebee
I implemented your changes and the problem persists.
You should be able to observe a focus loss after an item is selected. I'm seeing this in several projects that don't involve the Ctx control.
On these windows it may be difficult to see since the focus trace line isn't visible on a list box item.

1. I select an item in the list box.
2. I press tab.
3. I notice I cannot select another item by pressing the arrow keys, or by rotating the mouse wheel. I notice that the tab control did not receive focus.
4. I press tab.
5. Focus is returned to the list box, as I can now do what I described in step 3.

This may be trivial for mouse users who click on everything, but for keyboard users this is weird.

 18 
 on: June 27, 2020, 09:34:40 AM 
Started by Paul Squires - Last post by Paul Squires
I'm having some tab/focus issues.
In the attached project, the List box does not receive focus when the form is shown.
Loading an image, clicking on the image, or on the label does not steal focus from the list box - as it should.
Pressing the tab key however, removes focus.
Pressing it again, restores focus.
Minimizing the window, then restoring it, steals focus.
Switching to another application window, then returning to the test window, steals focus.
Overall, is not expected behavior for this window.

From what I can observe, looks like you after you have loaded all of the listbox items you have not selected any. If none are selected, then when the listbox gets focus it has nothing to highlight. Pressing the down arrow would move the focus to the first item and then you would see the highlighted item.

I would load your listbox in the Load event (rather than the FormReady), but in the FormReady event I'd set the focus to the Lsitbox just in case the focus got stolen away during the for creation.

Code: [Select]
''
''
Function Form1_Load( ByRef sender As wfxForm, ByRef e As EventArgs ) As LRESULT
     ' // Add an image control
   dim pWindow as CWindow ptr = AfxCWindowPtr(sender.hWindow)
   if pWindow then
      pImageCtx = new CImageCtx(pWindow, IDC_IMAGECTX,, 0, 0, 500, 500)
      if pImageCtx then
         pImageCtx->SetImageAdjustment(GDIP_IMAGECTX_ACTUALSIZE)
         pImageCtx->SetBkColor(32000)
         pImageCtx->SetBkColorHot(32000)
      end if
   end if

  dim n as integer
  for n = 1 to 30
    form1.List1.Items.Add("Listbox item " & str(n))
  next n
 
  ' Set the selected item to be the first item
  form1.List1.SelectedIndex = 0

  Function = 0
End Function

''
''
Function Form1_FormReady( ByRef sender As wfxForm, ByRef e As EventArgs ) As LRESULT
  Form1.List1.Focused = true
  Function = 0
End Function

 19 
 on: June 27, 2020, 09:09:06 AM 
Started by Paul Squires - Last post by Paul Squires
> When I disable a list box, the background is not greyed out.

This is Windows normal behaviour.

Yes, I believe the background should not get grayed out but the text color should be grayed. It isn't in WinFBE because I have implemented the Listbox as OwnerDraw and have not taken into consideration an alternate color for foreground text when the Listbox is disabled. I've put that on my to do list.

 20 
 on: June 27, 2020, 08:35:28 AM 
Started by Paul Squires - Last post by Josť Roca
> When I disable a list box, the background is not greyed out.

This is Windows normal behaviour.

Pages: 1 [2] 3 4 ... 10