I am not yet on v15, still on v13
from my memory - on a Mac - popups have not been tubbable.
for the combo box - here is what I use for them (it is simple)
Whether this can resolve your problem with them I do not know, but it
might be worth a try.
On Data Change is the only event turned on for the combo box
Follows the combos object method:
Case of
: (Form event=On Data Change) //if the user made/changed combo
selection
utl_combo_Check_Selection (Self
;<>x_User_Option;->[Experiments]Assigned_to_Tech;->cmb_User_IDs)
End case
utl_combo_Check_Selection, accepts a pointer to the combo box, a text
value to display if the entry is incorrect, pointer to the field or var
to assign the value, and (optionally) a pointer to a secondary array
which is assigned to the field/var, rather then the actual entry
(basically an ID value).
In the above example, [Experiments]Assigned_to_Tech will be assigned a
longint User ID, rather then the User's name.
The code for this method follows:
//Project Method: utl_Combo_Check_Selection
// $1 - pointer - to combo box to check the entered value
// $2 - string - text to display in message box - what the combo is
asking for
// $3 - pointer (optional) - to field/var to assign value
// $4 - pointer (optional) - to secondary array to assign value from
//determines if the user entry in a combo box ($1) is valid.
//that is doe sthe user entered value exist in the combo boxes' list
//of values. If the entry is valid, either the that value, or
alternatively the
//corresponding secondary array value ($4) is assigned.
//Returns a longint to show that the user entry was valid
//RETURNS - longint - location where item was found returns -1 if not
acceptable
//• Updated 2/25/16 by Chip - added utility call for type check
C_POINTER($1;$3;$4;$Combo;$Destination;$Secondary)
C_TEXT($2;$Alert_Specifics;$Entered_Value;$msg)
C_LONGINT($Loc;$0;$Type)
$Combo:=$1 //combo box being edited/modified
$Alert_Specifics:=$2 //text for user message if an error occurs
If (Count parameters>=3)
$Destination:=$3 //destination field - if provided
If (Count parameters=4)
$Secondary:=$4 //secondary (parallel) array to use for assigning field
value - if provided
Else
$Secondary:=<>ptr_Nil
End if
Else
$Destination:=<>ptr_Nil
$Secondary:=<>ptr_Nil
End if
If ($Combo->{0}="") //if the combo box was cleared - clear the
underlying field too
$Loc:=Find in array($Combo->;<>x_Combo_None) //try to locate a "none"
option
Else //there is a value in the combo - locate it in the allowed
(contents of the combo box) values
$Loc:=Find in array($Combo->;$Combo->{0})
End if
If ($Loc>0) //the entered/selected item was found - user
elected/entered a valid value
If (Not(Nil($Destination))) //there is a destination field/var to
populate
If (Not(Nil($Secondary))) //there is a secondary value to use
$Destination->:=$Secondary->{$Loc}
Else // no secondary, but there is a destination, assignment use
combo array value
$Destination->:=$Combo->{$Loc}
End if
Else //
//do nothing - no additional field/var to get value for
End if
//assign the combo box - makes the combo entry match the text in the
pop-up list
$Combo->{0}:=$Combo->{$Loc}
Else //the entered value is not valid
If ($Combo->{0}#"") //stop message for empty item selection
GOTO OBJECT($Combo->) //reset the entry area back to the combo box
$Type:=Type($Combo->) //invalid entry - clear data entry area of the
combo box
Case of
: ($Type=String array) | ($Type=Text array)
$Entered_Value:=$Combo->{0}
$Combo->{0}:=""
: ($Type=Real array) | ($Type=Real array) | ($Type=LongInt array) |
($Type=Integer array)
$Entered_Value:=String($Combo->{0})
$Combo->{0}:=0
: ($Type=Date array)
$Entered_Value:=String($Combo->{0})
$Combo->{0}:=<>d_Empty_Date
End case
$msg:="'"+$Entered_value+"' is not an allowed "+$Alert_Specifics+<>x_Cr
$msg:=$msg+"Please select a(n) "+$Alert_Specifics+", from the list."
utl_msg_Alert ($msg) //tell user
If (Not(Nil($Destination))) //if there is a destination specified -
clear it too
$Type:=Type($Destination->)
Case of
: (utl_type_Is_Alpha ($Destination))
//: ($Type=Is String Var) | ($Type=Is Alpha Field) | ($Type=Is Text)
$Destination->:=""
: (utl_type_Is_Numeric ($Destination))
//: ($Type=Is LongInt) | ($Type=Is Real)
$Destination->:=0
: ($Type=Is Date)
$Destination->:=<>d_Empty_Date
End case
End if
Else //selection is empty
If (Not(Nil($Destination))) //if there is a destination specified -
clear it too
$Type:=Type($Destination->)
Case of
: ($Type=Is String Var) | ($Type=Is Alpha Field) | ($Type=Is Text)
$Destination->:=""
: ($Type=Is LongInt) | ($Type=Is Real)
$Destination->:=0
: ($Type=Is Date)
$Destination->:=<>d_Empty_Date
End case
End if
End if
End if
$0:=$Loc
//
On Wed, 19 Oct 2016 10:23:19 -0700, Janet Jonas wrote:
> I have always used Combo boxes on my forms from time immemorial, but
> we were having crashing issues using them in v15, and the code was
> always clunky because most of the time the selection must be limited
> to the choices in the array anyway. I recreated the controls on a
> couple of problematic forms, changing them to "Popup Drop down List”
> objects with fewer events needed and less code in the object methods.
> I also checked the “Focusable” and “Tabable” properties for the
> objects. The controls work great, are much cleaner and faster for
> those of us who are “clickers” but our data entry staff are used to
> tabbing into controls, using a down arrow if necessary to drop down
> the list and typing away, all from the keyboard in order to maintain
> data entry efficiency by not going back and forth to a mouse. They
> are now upset because the controls are NOT tabable in any way, the
> cursor just skips to the next field. We are using v15.2 HF2. Anything
> I’m missing? Is this a bug in the properties and Tab Order dialogs,
> or is a bug in functioning?
>
> JJ
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ: http://lists.4d.com/faqnug.html
> Archive: http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************