LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default VBA Excel - Textbox disappearing BEHIND listview control - Zorder is useless.

Hi. I have the following problem: On a userform I need to show some
(editable) data in a grid. I am using a listview control.

Since for some unknown reason the HitTest method refuses to work when
in Report mode, giving me erorrs even if I have a single line in the
HitTest event: "debug.print X" !!!, on MouseUp I detect (with
SendMessage(lsvTruckingCharges.hWnd, LVM_SUBITEMHITTEST, 0&, hti)) the
subitem the user has clicked on. Now I need to position a textbox/a
combo box/a date-time picker in the cell's place, for editing,
depending on the column's type.

I have started testing with a texbox, with the code (snip):

With txtFloat
'Set its text:
.Text = lsvTruckingCharges.ListItems(lngRow +
1).ListSubItems(lngCol)
.SelStart = 0
.SelLength = Len(.Text)

'Set its dimensions:
.Width = lsvTruckingCharges.ColumnHeaders(lngCol + 1).Width
.Height = lsvTruckingCharges.ListItems(lngRow + 1).Height

'Position it:
.Left = lsvTruckingCharges.Left +
lsvTruckingCharges.ColumnHeaders(lngCol + 1).Left
.Top = lsvTruckingCharges.Top +
lsvTruckingCharges.ListItems(lngRow + 1).Top
End With

The problem is that the textbox DISAPPEARS behind the listview, and no
amount of Zorder will show it. What can I do ? Where is the problem
?????? I did something similar in VB (not VBA) and it works like a
charm. Do ai have any alternatives ?

Thanks a lot
Alex. Nitulescu

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disappearing Textbox at the bottom area of a chart Pascal.H Charts and Charting in Excel 0 November 4th 08 03:37 PM
Images cannot be assigned to Listview control kvenku[_15_] Excel Programming 0 June 9th 04 12:56 PM
How to add icons in the Listview control kvenku[_13_] Excel Programming 3 June 3rd 04 01:07 PM
How to use Listview control kvenku[_10_] Excel Programming 2 June 1st 04 05:45 AM
Disappearing Text in textbox scottnshelly[_11_] Excel Programming 4 April 10th 04 01:48 PM


All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"