strate Posted November 29, 2004 Posted November 29, 2004 (edited) In the attached file is a picture of my display screen I want the user to be able to tab all the way thru the program. The problem is I would like it if the "Edit" buttons were skipped. Is this possible. Here is the way the code is currently.expandcollapse popup$PROG_X = 300 $PROG_Y = 450 $CheckBox_X = 10 $CheckBox_Y = 60 $CheckBox_H = 20 $Label_X = 10 $Label_Y = 10 $Label_H = 20 $Label_W = 100 $Input_X = 10 $Input_Y = 10 $Input_H = 20 $Input_W = 140 $Button_X = 150 $Button_y = 10 $Button_H = 20 $Button_W = 40 $File = "H:\LVWIN70\QBASIC\DESC_1.txt" $list="" $list2=@crlf $count=0 $counter=0 $badnum="" $badnum="|" For $i= 1 to 1000 $line = FileReadLine($File,$i) If $Line = "" Then ExitLoop if @error = -1 then continueloop $list=$list & $line & @cr $list2=$list2 & $line & @crlf $counter=$counter+1 $badnum=$badnum & $i &"|" next #include <GUIConstants.au3> GUICreate("Label Data Entry",$PROG_X,$PROG_Y,-1,-1,0x00CF0000) $SO_EDIT = GUICtrlCreateButton ("Edit",$Input_W - 85,$Input_Y + 168,$Button_W,$Button_H) $CUST_EDIT = GUICtrlCreateButton ("Edit",$Input_W + 15,$Input_Y + 213,$Button_W,$Button_H) $TRW_EDIT = GUICtrlCreateButton ("Edit",$Input_W + 15,$Input_Y + 253,$Button_W,$Button_H) $DESC_EDIT = GUICtrlCreateButton ("Edit",$Input_W + 15,$Input_Y + 293,$Button_W,$Button_H) $DUE_EDIT = GUICtrlCreateButton ("Edit",$Input_W - 75,$Input_Y + 333,$Button_W,$Button_H) $QTYREQ_EDIT = GUICtrlCreateButton ("Edit",$Input_W - 75,$Input_Y + 373,$Button_W,$Button_H) $PER_EDIT = GUICtrlCreateButton ("Edit",$Input_W - 75,$Input_Y + 413,$Button_W,$Button_H) GUICtrlCreateLabel ( "Check what you want to create from the list below.", $Label_X, $Label_Y,$Label_W ,$Label_H + 20) $GM_ADD = GUICtrlCreateCheckbox ("GM Address Label", $CheckBox_X, $CheckBox_Y, 120, $CheckBox_H) $NON_GM_ADD = GUICtrlCreateCheckbox ("NON-GM Address Label", $CheckBox_X,$CheckBox_Y + 20, 140, $CheckBox_H) $AUDIT = GUICtrlCreateCheckbox ("Audit Tag", $CheckBox_X, $CheckBox_Y + 40, 120, $CheckBox_H) $4X6_OP = GUICtrlCreateCheckbox ("4X6 Over Pack Labels", $CheckBox_X, $CheckBox_Y + 60, 140, $CheckBox_H) GUICtrlCreateLabel ( "Sales Order Number:", $Label_X, $Label_Y + 150,$Label_W ,$Label_H) $SO = GUICtrlCreateInput ( "",$Input_X,$Input_Y + 168,$Input_W - 100,$Input_H) GUICtrlCreateLabel ( "Customer Part Number:", $Label_X, $Label_Y + 195,$Label_W + 30 ,$Label_H) $CUST = GUICtrlCreateInput ( "",$Input_X,$Input_Y + 213,$Input_W,$Input_H) GUICtrlCreateLabel ( "TRW Kit Number:", $Label_X, $Label_Y + 240,$Label_W ,$Label_H) $TRW = GUICtrlCreateInput ( "",$Input_X,$Input_Y + 253,$Input_W,$Input_H) GUICtrlCreateLabel ( "Description:", $Label_X, $Label_Y + 280,$Label_W ,$Label_H) $DESC = GUICtrlCreateInput ( "",$Input_X,$Input_Y + 293,$Input_W,$Input_H) GUICtrlCreateLabel ( "Due Date:", $Label_X, $Label_Y + 320,$Label_W - 50,$Label_H) $DUE = GUICtrlCreateInput ( "",$Input_X,$Input_Y + 333,$Input_W - 90,$Input_H) GUICtrlCreateLabel ( "Quantity Requested:", $Label_X, $Label_Y + 360,$Label_W,$Label_H) $QTY = GUICtrlCreateInput ( "",$Input_X,$Input_Y + 373,$Input_W - 90,$Input_H) GUICtrlCreateLabel ( "Quantity Per Full Pallet:", $Label_X, $Label_Y + 400,$Label_W + 40,$Label_H) $PER = GUICtrlCreateInput ( "",$Input_X,$Input_Y + 413,$Input_W - 90,$Input_H) $PRINT = GUICtrlCreateButton ("Print",$Button_X + 50,$Button_Y,$Button_W,$Button_H) $CLEAR = GUICtrlCreateButton ("Clear",$Button_X + 100,$Button_Y,$Button_W,$Button_H) GUISetState (@SW_SHOW) ;~ GUICtrlSetState ($SO,$GUI_FOCUS) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEndThanks Edited November 29, 2004 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
strate Posted November 29, 2004 Author Posted November 29, 2004 You may be able to set custom "bitor"ed styles for the button omitting the WS_TABSTOP style...Lar.<{POST_SNAPBACK}>I seen that WS_TABSTOP is a forced condition; if I add a selection, instead of leaving it blank, in the Button control line will it override the forced conditions? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Developers Jos Posted November 29, 2004 Developers Posted November 29, 2004 I seen that WS_TABSTOP is a forced condition; if I add a selection, instead of leaving it blank, in the Button control line will it override the forced conditions?<{POST_SNAPBACK}>Could try this way:$SO_EDIT = GUICtrlCreateButton ("Edit",$Input_W - 85,$Input_Y + 168,$Button_W,$Button_H) GUICtrlSetStyle(-1,0x0) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
strate Posted November 29, 2004 Author Posted November 29, 2004 Could try this way:$SO_EDIT = GUICtrlCreateButton ("Edit",$Input_W - 85,$Input_Y + 168,$Button_W,$Button_H) GUICtrlSetStyle(-1,0x0)<{POST_SNAPBACK}>That worked great thank you! INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
CyberSlug Posted November 29, 2004 Posted November 29, 2004 So this means that: GUICtrlCreateButton("text", 10, 10, 50, 20, 0x0) ;removes all EXCEPT forced styles GUICtrlSetStyle($ctrlRef ,0x0) ;removes ALL custom styles Is this documented? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Administrators Jon Posted November 30, 2004 Administrators Posted November 30, 2004 Probably worth creating a $GUI_NOTABSTOP style/state. I think the default of ON (tabstop all controls) is sound, but a way to unselect a few would be nice. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
CyberSlug Posted November 30, 2004 Posted November 30, 2004 (edited) Another question: I know order of control creation affects the tab stop order, but is there an easy way to change the order? DllCall or something? I already know about workarounds using GuiCtrlDelete/GuiCtrlCreate... and HotKeySet("{Tab}"...) Edited November 30, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Administrators Jon Posted November 30, 2004 Administrators Posted November 30, 2004 Another question: I know order of control creation affects the tab stop order, but is there an easy way to change the order? DllCall or something?I already know about workarounds using GuiCtrlDelete/GuiCtrlCreate... and HotKeySet("{Tab}"...)I don't think you can actually. When you code something in VC you have to assign the order when you create the dialog and it just orders the creation of teh control - just like autoit. Could be wrong though. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
CyberSlug Posted November 30, 2004 Posted November 30, 2004 I don't think you can actually. When you code something in VC you have to assign the order when you create the dialog and it just orders the creation of teh control - just like autoit. Could be wrong though.<{POST_SNAPBACK}>I thought the last time I used Visual Basic 6, there was a "TabIndex" property for each control... It was just an integer that affected the tab ordering. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Administrators Jon Posted November 30, 2004 Administrators Posted November 30, 2004 I thought the last time I used Visual Basic 6, there was a "TabIndex" property for each control... It was just an integer that affected the tab ordering.Looks like it is posYes, it's possible.If you want to do this during designing your dialog, all resourceeditors support changing of the tab order.For Microsoft Developer Studio take a look at 'Layout/Tab order' menucommand.If you want to do this in runtime, take a look atSetWindowPos API function Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
CyberSlug Posted November 30, 2004 Posted November 30, 2004 Thanks, Jon! That was just the hint I needed: ; Script generated by AutoBuilder 0.5 Prototype $GUI = GuiCreate("Example TabStop ordering") $Button_1 = GuiCtrlCreateButton("Button1", 100, 40, 150, 50) $Button_2 = GuiCtrlCreateButton("Button2", 100, 130, 160, 50) $Button_3 = GuiCtrlCreateButton("Button3", 100, 220, 170, 50) LastTabStop($GUI, $Button_2) GuiSetState() While GuiGetMsg() <> -3;GUI_EVENT_CLOSE, I know, I know WENd ; Make a control have the last spot in tab ordering.... useful if you loop through all controls from first to last.... Func LastTabStop($GUI, $ref) Local $CtrlHandle = ControlGetHandle($GUI, "", $ref) Local $orderingHandle = 1;HWND_BOTTOM = 1; Local $flags = 0x3;sum of SWP_NOSIZE = 0x1; and SWP_NOMOVE = 0x2; THUS ONLY AFFECT THE Z-ORDER Return DllCall("user32.dll", "int", "SetWindowPos", "hwnd",$CtrlHandle, "hwnd",$orderingHandle, _ "int",0, "int",0, "int",0, "int",0, "int",$flags) EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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