[SOLVED] Tab Order Inop? lazarus / 10-Designer ---------------------------------------------------------------------- WickedDum · 2013-11-14 21:34 I have 24 fields I want to be able to have the user tab through.  I have attached the Tab Order.  When I tab thru, after City (7), I see nothing; I hit Tab again and the cursor shows up in Country (10).  It skips 8 and 9. Also, I am skipping lbxClients (15).  In Object Inspector->Properties->TabOrder it is (15) and TabStop is False.  It works.  Is there a way I can remove it from the list and the property field altogether? Thanks! < Steve > ---------------------------------------------------------------------- howardpc · 2013-11-14 23:54 TEdit has an AutoSelect property (which is True by default), so as you tab among edits you see the edit field highlighted as you enter the control, and the highlight goes as you leave the control by tabbing elsewhere to select a different control. TListBox has no AutoSelect property because unlike an edit which has only a single text-entry field, a listbox has many items (unless it is empty). How can it know which item to select when you enter it? So tabbing to a listbox does not produce the same visual feedback of a moving highlight. If you want you can force the highlighting of any first item on entry by adding an OnEnter event handler for a listbox something like Code: [Select]procedure TForm1.lbExampleEnter(Sender: Tobject); begin   if lbExample.Count>0 then    lbExample.ItemIndex:=0; end; You would need a corresponding OnExit handler to remove the focus highlight when tabbing away from the listbox. AFAIK You cannot remove focus-able controls from the taborder list. If such a control's TabStop property is False it is given the highest value possible, but it is actually meaningless since it has been taken out of the tab order circuit anyway through the setting of the TabStop property. It represents the TabOrder the control would immediately show if its TabStop property were set back to True. ---------------------------------------------------------------------- WickedDum · 2013-11-15 07:17 Thanks!! Appreciate the sample code.  I understand the need for the OnExit. Any idea why it skipped over the ZipCode field when it left the TListBox? And... "AFAIK" means...? < Steve > ---------------------------------------------------------------------- howardpc · 2013-11-15 08:09 Quote from: WickedDum on November 15, 2013, 08:17:04 amAny idea why it skipped over the ZipCode field when it left the TListBox? Presumably because either its TabStop property was False, or because its Enabled property was False (which has the same effect on tabbing as setting TabStop to False). QuoteAnd... "AFAIK" means...? As Far As I Know For instance, setting a control's Visible property to False removes it from view in the running program and obviously prevents you from tabbing to it, yet it remains listed in the TabOrder dialog. This dialog simply lists all existing focus-able controls, whatever their visibility or behaviour might be. Its purpose is to allow easy reassignment of TabOrder values to several controls at once. Their actual behaviour-when-tabbed at runtime is controlled not only by their TabOrder property, but by other properties too. Each control is an instance of a complex class, and actual runtime behaviour is the outcome of the interaction between many properties and attributes, which may possibly conflict with or override each other. Lazarus gives you the source, so you can always delve deeper to see how a certain behaviour is programmed. ---------------------------------------------------------------------- WickedDum · 2013-11-15 16:43 Thanks! Both TabStop and Enabled are set to true....  I'll highlight the first item in the list to see if that helps. Delve into the source?  Not at this stage! Appreciate your help. < Steve >