Topic: Button Next
Hello everyone, how to display a name in a TexBox with a "Next" button.
Bonjour a tous, comment faire pour afficher un nom dans un TexBox avec un bouton "Suivant".
My Visual Database → General → Button Next
Hello everyone, how to display a name in a TexBox with a "Next" button.
Bonjour a tous, comment faire pour afficher un nom dans un TexBox avec un bouton "Suivant".
Hi Sabine,
Can you either upload an example of what you want to achieve or give more detail - specifically where the 'name' that you want to display in a text box is coming from (another field, a row in a tablegrid)?
Derek.
Hello Derek, here is the start of my project. I would like to navigate in the "Fish Names" TexBox with "Next" and "Previous" buttons, can you help me?
Bonjour Derek, voici le début de mon projet. Je voudrais naviguer dans le TexBox "Noms du poisson" avec des boutons "Suivant" et "Précédent", peut-tu m'aider?
Sabine
procedure Prises_OnShow (Sender: TObject; Action: string);
begin
Prises.Edit4.Tag := -1;
end;
procedure Prises_bPrev_OnClick (Sender: TObject; var Cancel: boolean);
begin
if ( Prises.Edit4.Tag > 0 ) then
begin
Prises.TableGrid1.SelectedRow := Prises.Edit4.Tag-1;
Prises.Edit4.Tag := Prises.Edit4.Tag-1;
Prises.bEdit.Click;
Prises.TableGrid1.SelectedRow := Prises.Edit4.Tag;
end;
dooleanEnabledButton
end;
procedure Prises_TableGrid1_OnCellClick (Sender: TObject; ACol, ARow: Integer);
begin
Prises.Edit4.Tag := Prises.TableGrid1.SelectedRow;
dooleanEnabledButton;
end;
procedure Prises_bNext_OnClick (Sender: TObject; var Cancel: boolean);
begin
if ( Prises.bNext.Tag < Prises.TableGrid1.RowCount ) then
begin
Prises.TableGrid1.SelectedRow := Prises.Edit4.Tag+1;
Prises.Edit4.Tag := Prises.Edit4.Tag+1;
Prises.bEdit.Click;
Prises.TableGrid1.SelectedRow := Prises.Edit4.Tag;
end;
dooleanEnabledButton
end;
procedure dooleanEnabledButton;
begin
if (Prises.Edit4.Tag+1 < Prises.TableGrid1.RowCount) then Prises.bNext.Enabled := True else Prises.bNext.Enabled := False;
if (Prises.Edit4.Tag+1 > 1) then Prises.bPrev.Enabled := True else Prises.bPrev.Enabled := False;
end;
Thanks to you Sibprogsistem, it works great.
Best wishes.
Sabine
Morning Sabine, Sibprogsistem,
Here's a slightly different way of doing it.
Derek.
Thanks Derek, I will see to apply the best way to do it for my program.
Have a good day.
Merci Derek, je vais voir pour appliquer la meilleure façon de faire pour mon programme.
Bonne journée.
Sabine
How to add a "CheckBox" to the code.
Hi Sabine
Sorry, but we do not understand what you are talking about and most importantly what you are thinking. )))
What do you want to see, what code are you talking about?
I talk about the rest of the code on this post "My fishing", I would like to include its ChekBox in my program.
if (prises.tablegrid1.SelectedRow) then
SQLExecute('UPDATE Prises SET "'+TdbCheckBox(Sender).dbField+'"="'+TdbCheckBox(Sender).sqlValue+'"WHERE id='+prises.tablegrid1.sqlvalue);
for i := 0 to Prises.ComponentCount-1 do
if (TdbCheckBox(Prises.Components[i]) is TdbCheckBox) then
TdbCheckBox(Prises.Components[i]).Checked := StrToBool(SQLExecute('SELECT IFNULL("'+TdbCheckBox(Prises.Components[i]).dbField+'",0) FROM Prises WHERE id='+prises.tablegrid1.sqlvalue));
Parent по чему-то не сработал сделал через is
Thank you Sibprogsistem, I completed the code and it works great.
thank you
My Visual Database → General → Button Next
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi