A question about Textentry.AdvanceOnCR behaviour

Discuss GUI programming with the RapaGUI plugin here
Post Reply
pecaN
Posts: 124
Joined: Thu Jun 10, 2010 4:15 pm

A question about Textentry.AdvanceOnCR behaviour

Post by pecaN »

Hi,

i've got a question. i have a window, there are e.g. 6 textentry widgets and then a button widget. When i set "Textentry.AdvanceOnCR" on all the texentry widgets and start with the first texentry widget, I enter my text, press enter and it jumps to the following texentry widget which is right. but when I get to the last texentry widget, enter my text and press enter, nothing happens, it doesn't jump either to the following button widget or returns back to the first textentry widget, I have to press TAB key repeatedly to cycle through all the widgets.

Please note I'm just asking, it's not a problem as I can achieve my goal through Texentry.Acknowledge, just want to understand how this works :-) thanks
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: A question about Textentry.AdvanceOnCR behaviour

Post by airsoftsoftwair »

Actually, it should work in the way that the button gets activated when you press enter in the last widget. Can you post your XML code? (but make it as short as possible)

Also, what platform are you on?
pecaN
Posts: 124
Joined: Thu Jun 10, 2010 4:15 pm

Re: A question about Textentry.AdvanceOnCR behaviour

Post by pecaN »

OK, here's my xml code on Windows 10 :

first there are 7 texentries

<hgroup><hspace width="37"/><label>Název knihy</label><textentry id="nazev" AdvanceOnCR="True"/><hspace width="3"/></hgroup>
<hgroup><hspace width="3"/><label>Příjmení autora/ky</label><textentry id="prijmeni" AdvanceOnCR="True"/><hspace width="3"/></hgroup>
<hgroup><hspace width="12"/><label>Jméno autora/ky</label><textentry id="jmeno" AdvanceOnCR="True"/><hspace width="3"/></hgroup>
<hgroup><hspace width="45"/><label>Nakladatel</label><textentry id="nakladatel" AdvanceOnCR="True"/><hspace width="3"/></hgroup>

<hgroup>
<hspace width="42"/><label>Rok vydání</label><textentry id="vydani" AdvanceOnCR="True" MaxLen="4" Accept="0123456789" FixWidth="true" width="38"/>
<label>Počet stran</label><textentry AdvanceOnCR="True" id="strany" FixWidth="true" width="38" MaxLen="4" Accept="0123456789"/>
<label>Cena</label><textentry id="cena" AdvanceOnCR="True" Accept="0123456789"/><hspace width="3"/>
</hgroup>

<vspace height="3"/>
</vgroup>

<vspace height="2"/>

and now trhere are those 2 buttons

<hgroup>
<button id="UlozKnihu">Uložit knihu do databáze</button>
<button id="ZrusUlozeni">Zrušit přidání knihy</button>
</hgroup>

As I wrote, when entering text to first 6 entries,pressing "ENTER" jumps to the next texentry. But when I enter my text to the last entry with id="cena" and press ENTER, nothing happens, I suppose it should activate the first button with id="UlozKnihu" ?

pecaN
pecaN
Posts: 124
Joined: Thu Jun 10, 2010 4:15 pm

Re: A question about Textentry.AdvanceOnCR behaviour

Post by pecaN »

EDIT : FIXED !!!

I found out that my problem was that those 7 texentries were grouped in <vgroup> (I forgot to write <vgroup> above the first textentry) .

So when I deleted <vgroup>, now it works and it jumps to the button!!

pecaN
Post Reply