Sign in to follow this  
Followers 0
billshu

Menu-Table-Form

5 posts in this topic

I am getting ready to write a program with Table-Form layout.  I need a window that contains a list of ITEMS, with buttons at the bottom for [insert],[update] and [Delete].  These buttons will open the Form window to complete the insert, update or delete.   I am not sure the best way to start this in AutoIt.  Does anyone know of some sample code or help window that would be helpful?

Thanks

Share this post


Link to post
Share on other sites



Where are you pulling the ITEMS from? I would start with a simple GUI, like below. Then, depending on how you want your items pulled in, you have a couple of options. The more you can tell us about what you're trying to do, the more we can assist :)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
 
GUICreate("Test", 300, 300)

$btnInsert = GUICtrlCreateButton("Insert", 10, 260, 50, 30)
$btnUpdate = GUICtrlCreateButton("Update", 100, 260, 50, 30)
$btnDelete = GUICtrlCreateButton("Delete", 200, 260, 50, 30)
$lvItems = GUICtrlCreateListView("col1|col2", 10, 10, 100, 200)
 $items1 = GUICtrlCreateListViewItem("Item1|Item2", $lvItems)
 $items2 = GUICtrlCreateListViewItem("Item3|Item4", $lvItems)
 
GUISetState(@SW_SHOW)
 
    While 1
        Switch GUIGetMsg()
   Case $GUI_EVENT_CLOSE
    ExitLoop
   case $btnInsert
    ;
  EndSwitch
    WEnd
GUIDelete()

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Thanks, I will play around with your sample.  I will be reading the ITEMs from a *.txt file.  One ITEM per line and fields separated by "|" 

Share this post


Link to post
Share on other sites

Yes, this is perfect!!!   I looked at your code and then the help screens . 

 MsgBox($MB_SYSTEMMODAL, "listview item", GUICtrlRead(GUICtrlRead($listview)), 2)

This line make it clear how to proceed.  I was not sure how my [update] button would know which ITEM to update.

Thanks Again.....

Share this post


Link to post
Share on other sites

Happy to help :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0