IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Rock Ridge Farm (Larry) on February 08, 2006, 06:52:58 PM

Title: On demand listview
Post by: Rock Ridge Farm (Larry) on February 08, 2006, 06:52:58 PM
I am having a problem.
I am trying to build a dynamic listview. I want the list to appear when
selected by a button and go away when you leave the list.
I was trying to make this work like a dialog.
I am having no luck - help wanted.
Title: Re: On demand listview
Post by: Parker on February 08, 2006, 07:49:12 PM
I'm having a little trouble understanding what exactly it is that you want. So let me know if I get anything wrong.

You want a listview control that becomes filled when the user selects a button, and when the mouse leaves the control it should become empty?

Or you want the listview to suddenly appear? In that case you can use ShowWindow to hide/show it, I actually just wrote a bit of code for that to change between 3 treeviews or an edit based on the selected value of a combo box.
case WM_COMMAND
if (loword(wParam) = 2) and (hiword(wParam) = CBN_SELCHANGE) then
for i = 3 to 6
ShowWindow(GetDlgItem(hWnd, i), SW_HIDE)
next
ShowWindow(GetDlgItem(hWnd, SendMessage(GetDlgItem(hWnd, 2), CB_GETCURSEL, 0, 0)+3), SW_RESTORE)
end if

it would take a little conversion and a couple of constants defined. You can replace loword(wParam) with wParam & 0xFFFF, and replace hiword(wParam) with wParam >> 16.
Also there is an AnimateWindow function if you want it to be fancy and fade in, roll down, etc.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/animatewindow.asp
Title: Re: On demand listview
Post by: Rock Ridge Farm (Larry) on February 09, 2006, 05:57:13 AM
Actually - I want a menu item that when selected witll display the listview.
Then I want an exit button in the listview that will hide/close the listview.
I have played with this most of the night and have not made it work.
I can create a listview but have not figured out how to add the hide button
to the list view.
Title: Re: On demand listview
Post by: Parker on February 09, 2006, 08:18:32 AM
You're going to have a very hard time doing that. I think an easier way would be to add an item to either the top or bottom that says "Close me" or whatever you want it to say.

But if you want to embed a button, I think it would look nice. See this article (http://www.catch22.net/tuts/editbutton.asp) on how to embed a button into a different control.