Docfxit Posted December 3, 2006 Share Posted December 3, 2006 Hi, Is there a Getting Started tutorial for KODA some place? Or a Getting Started tutorial for Scite GUI. I haven't done GUI before. I need to do something that I would think would be very simple but I can't figure out how to do it. I need to display: __________________________Heading ______Heading______________Heading_______________Heading Variable 1 - Variable 2___Variable 5 - Variable 6___Variable 9 - Variable 10 Variable 3 - Variable 4___Variable 7 - Variable 8___Variable 11 - Variable 11 I figured out how to do a text label for the heading just fine. I can't figure out how to display a variable field. If someone has a sample of something like this it would be really great. Thank you, Docfxit PS: I put the Underscore in only so the spacing would come out correctly. Please ignore them. Link to comment Share on other sites More sharing options...
Zedna Posted December 3, 2006 Share Posted December 3, 2006 Use control type Input (GUICtrlCreateInput) for display content of variables. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Docfxit Posted December 4, 2006 Author Share Posted December 4, 2006 Use control type Input (GUICtrlCreateInput) for display content of variables.Thank you for the Reply... I don't need the user to input anything. I need to display the variables I have created in AutoIt. So far I have figured out some of it but I am stuck on how to accomplish parts of it. 1. I can't figure out how to make the items in a GUICtrlSetData to start out wide enough. I can drag them wider but I need them to start wide enough. #include <GuiConstants.au3> GuiCreate("Officers Election 2006", 1192, 323,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $font="Comic Sans MS" $Label_1 = GuiCtrlCreateLabel("ATU Election Results as They Are Being Tabulated", 270, 8, 550, 35) GUICtrlSetFont (-1,15, 400, 4, $font) $listview = GuiCtrlCreateListView ("President|Count|Vice President|Count|Fin Recording Sec|Count|Treasurer|Count|Exec Board Member|Count",10,50,1200,150);,$LVS_SORTDESCENDING) GUICtrlSetFont (-1,15, 400, 0, $font) ;$button = GuiCtrlCreateButton ("Value?",75,170,70,20) $item1=GuiCtrlCreateListViewItem("item1|col22|col23",$listview) $item2=GuiCtrlCreateListViewItem("",$listview) $item3=GuiCtrlCreateListViewItem("",$listview) GuiSetState() GUICtrlSetData($item1, $President[1] & "|" & $PresidentCnt[1] & "|" & $VicePresident[1] & "|" & $VicePresidentCnt[1] & "|" & $FinRecordingSec[1] & "|" & $FinRecordingSecCnt[1] & "|" & $Treasurer[1] & "|" & $TreasurerCnt[1] & "|" & $ExecBoardMember[1] & "|" & $ExecBoardMemberCnt[1]) GUICtrlSetData($item2, $President[2] & "|" & $PresidentCnt[2] & "|" & $VicePresident[2] & "|" & $VicePresidentCnt[2] & "|" & $FinRecordingSec[2] & "|" & $FinRecordingSecCnt[2] & "|" & $Treasurer[2] & "|" & $TreasurerCnt[2] & "|" & $ExecBoardMember[2] & "|" & $ExecBoardMemberCnt[2]) GUICtrlSetData($item3, $President[3] & "|" & $PresidentCnt[3] & "|" & $VicePresident[3] & "|" & $VicePresidentCnt[3] & "|" & $FinRecordingSec[3] & "|" & $FinRecordingSecCnt[3] & "|" & $Treasurer[3] & "|" & $TreasurerCnt[3] & "|" & $ExecBoardMember[3] & "|" & $ExecBoardMemberCnt[3]) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd This is what it looks like: Thank you, Docfxit Link to comment Share on other sites More sharing options...
Zedna Posted December 4, 2006 Share Posted December 4, 2006 (edited) GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 0, 100) ; 0-column index 100-column width (-1 for autowidth) oÝ÷ Ù«¢+ÙÕ¹MÑ ½±Õµ¹Í]¥Ñ ¤(%U% ÑɱM¹5Í ÀÌØí1¥ÍÑY¥Ü°ÀÌØí1Y5}MQ =1U59]%Q °À°ÄÌÔ¤(%U% ÑɱM¹5Í ÀÌØí1¥ÍÑY¥Ü°ÀÌØí1Y5}MQ =1U59]%Q °Ä°àÀ¤(%U% ÑɱM¹5Í ÀÌØí1¥ÍÑY¥Ü°ÀÌØí1Y5}MQ =1U59]%Q °È°ÐÔ¤(%U% ÑɱM¹5Í ÀÌØí1¥ÍÑY¥Ü°ÀÌØí1Y5}MQ =1U59]%Q °Ì°àÀ¤(%U% ÑɱM¹5Í ÀÌØí1¥ÍÑY¥Ü°ÀÌØí1Y5}MQ =1U59]%Q °Ð°äܤ(%U% ÑɱM¹5Í ÀÌØí1¥ÍÑY¥Ü°ÀÌØí1Y5}MQ =1U59]%Q °Ô°ÈÀÀ¤(%U% ÑɱM¹5Í ÀÌØí1¥ÍÑY¥Ü°ÀÌØí1Y5}MQ =1U59]%Q °Ø°àÔ¤(%U% ÑɱM¹5Í ÀÌØí1¥ÍÑY¥Ü°ÀÌØí1Y5}MQ =1U59]%Q °Ü°äÔ¤)¹Õ¹( This function must be called after every adding data into listview. Edited December 4, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Docfxit Posted December 4, 2006 Author Share Posted December 4, 2006 Thank you very much for your help. I don't think I understand exactly what this does. Did I put this in the proper spot? GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 0, 100) ; 0-column index 100-column width (-1 for autowidth) oÝ÷ Øn¶Øb±«mç§víë®*m¬¶§ºfÞ§íz½7èµLHDÂ8µ5bLzÞ}êí¢Ø^Ó~¢µéµ This function must be called after every adding data into listview. #include <GuiConstants.au3> GuiCreate("Officers Election 2006", 1192, 323,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $font="Comic Sans MS" $Label_1 = GuiCtrlCreateLabel("ATU Election Results as They Are Being Tabulated", 270, 8, 550, 35) GUICtrlSetFont (-1,15, 400, 4, $font) $listview = GuiCtrlCreateListView ("President|Count|Vice President|Count|Fin Recording Sec|Count|Treasurer|Count|Exec Board Member|Count",10,50,1200,150);,$LVS_SORTDESCENDING) GUICtrlSetFont (-1,15, 400, 0, $font) ;$button = GuiCtrlCreateButton ("Value?",75,170,70,20) $item1=GuiCtrlCreateListViewItem("item1|col22|col23",$listview) $item2=GuiCtrlCreateListViewItem("",$listview) $item3=GuiCtrlCreateListViewItem("",$listview) GuiSetState() GUICtrlSetData($item1, $President[1] & "|" & $PresidentCnt[1] & "|" & $VicePresident[1] & "|" & $VicePresidentCnt[1] & "|" & $FinRecordingSec[1] & "|" & $FinRecordingSecCnt[1] & "|" & $Treasurer[1] & "|" & $TreasurerCnt[1] & "|" & $ExecBoardMember[1] & "|" & $ExecBoardMemberCnt[1]) GUICtrlSetData($item2, $President[2] & "|" & $PresidentCnt[2] & "|" & $VicePresident[2] & "|" & $VicePresidentCnt[2] & "|" & $FinRecordingSec[2] & "|" & $FinRecordingSecCnt[2] & "|" & $Treasurer[2] & "|" & $TreasurerCnt[2] & "|" & $ExecBoardMember[2] & "|" & $ExecBoardMemberCnt[2]) GUICtrlSetData($item3, $President[3] & "|" & $PresidentCnt[3] & "|" & $VicePresident[3] & "|" & $VicePresidentCnt[3] & "|" & $FinRecordingSec[3] & "|" & $FinRecordingSecCnt[3] & "|" & $Treasurer[3] & "|" & $TreasurerCnt[3] & "|" & $ExecBoardMember[3] & "|" & $ExecBoardMemberCnt[3]) GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 0, 100); 0-column index 100-column width (-1 for autowidth) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Thank you, Docfxit Link to comment Share on other sites More sharing options...
Docfxit Posted December 4, 2006 Author Share Posted December 4, 2006 The next problem I am having is I would like the window to stay on top off all other windows. I thought this would do it but it isn't. GuiCreate("Officers Election 2006", 1280, 323, 300, 20 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_EX_TOPMOST)) I tried this: GuiCreate("Officers Election 2006", 1280, 323, 300, 20 , $WS_EX_TOPMOST) But that didn't work either. Thank you, Docfxit Link to comment Share on other sites More sharing options...
no925 Posted December 10, 2006 Share Posted December 10, 2006 You have probably sorted the on top requirement by now but you placed the $WS_EX_TOPMOST in the [style] value rather than the [exStyle] ie add another comma , GUICreate ( "title" [, width [, height [, left [, top [, style [, exStyle [, parent]]]]]]] ) Link to comment Share on other sites More sharing options...
Docfxit Posted December 10, 2006 Author Share Posted December 10, 2006 You have probably sorted the on top requirement by now but you placed the $WS_EX_TOPMOST in the [style] value rather than the [exStyle] ie add another comma , GUICreate ( "title" [, width [, height [, left [, top [, style [, exStyle [, parent]]]]]]] )That's really great. I didn't figure it out. I never used those before. That's a good catch. Thank you very much. Docfxit Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now