PDA

View Full Version : Input and active Tab button


rybosom
01-13-2008, 09:03 AM
how to make to go to the next input field when I press Tab button?

longedge
01-13-2008, 10:52 AM
Focus moves from one object to another determined by the z order of objects on the page that can accept input e.g. input, listbox, combobox.

You can set the focus to a particular object initially by using the Page.SetFocus action.

The way to see the z order of your objects is to look at the object browser which also allows you to drag the objects up and down to change their tab order.

p.s. Look at "Tab order" in the helpfile.

rybosom
01-13-2008, 10:56 AM
thx
if e_Key == 9 then Page.SetFocus("input2");
end

longedge
01-13-2008, 11:34 AM
Hmmm... I don't understand why you would want to do that and I can also imagine that it might cause unforeseen problems, depending on where you put the code, but if it does what you want that's all that counts :)

rybosom
01-13-2008, 02:38 PM
and next question => how type only one mark: "," or "." in the same input field?
for example: you can type only "0123456789,." marks but I want to detect that "dot" is exist and don't allow for type comma yet.

longedge
01-14-2008, 03:03 AM
Have a look at this (http://www.indigorose.com/forums/showthread.php?t=20832) post if you don't want to use an input mask. You can validate each character as it is typed in.

You can include a test for a "." or "," codes 188 & 190 I believe and if you want to restrict input to a single "." or "," perhaps use a variable set to false initially and then set to true within the test when one of the characters is input. If the variable is true, reject the input.