Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buttonset class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00670924
Message ID:
00670927
Vues:
24
>Hi all,
>i wantto design a toolbar such as include last,first,next,prev,add,edit,delete,... and i wantto use it for in my each applications and no need any code change in butto codes.. what is code samples for each button
>
>PS: is VFP picture or txtbuttons class codes hidden or complex
>
>TIA

Hi Soykan,
We develop that kind of ToolBar, part of our framework called Base_act.
It is done as CoolBar with Buttons New, Edit, Delete, Save, First, Previous, Search, Next, Last, Preview, Print, Send to XLS, Send to PDF.
It has no code in it, because in each form there are different rules to determine what button will be Enabled and what code will be executed. So our toolbar relies on forms properties such as FirstBtn, PrevBtn etc. and executes forms methods FirstData, PrevData etc. Every one of these methods takes carry to set the right values into corresponding properties.
For PrevData method we use code as:

SELECT TOP 2 * FROM myTable order by myId DESC WHERE myID < currentRecordID

In this case if we have 2 records in the result cursor PrevBtn remains Enabled other wise is becomes Disabled.
The code is similar for other methods.
Venelina Jordanova

Outsourcing IT Services Ltd.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform