This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
sample_code:database_navigate [2015/04/17 00:47] yep |
sample_code:database_navigate [2015/04/23 12:18] 194.98.70.135 |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======Application: | + | ======Application: |
I created this simple application to learn and play Databases and Dialogs | I created this simple application to learn and play Databases and Dialogs | ||
- | * Identify the sqlite databases in the default folder. | + | * Identify the sqlite databases in the default folder |
* List the tables | * List the tables | ||
* List Columns of tables | * List Columns of tables | ||
Line 7: | Line 7: | ||
* And could also delete a database | * And could also delete a database | ||
- | | + | |
+ | On My local Version, I have also 3 icons in subdirectory Img/ | ||
+ | I leave text, the code for icons is kepts inside | ||
+ | |||
+ | And if you do not have a database, use the Sample, and verify the database | ||
+ | |||
+ | enjoy. Sorry few French comments. | ||
<code JavaScript AdminDB.js> | <code JavaScript AdminDB.js> | ||
Line 75: | Line 81: | ||
remindColumn.SetTextColor( colorTitle ); | remindColumn.SetTextColor( colorTitle ); | ||
| | ||
- | //tColGauche=app.CreateText("db files", | + | |
- | | + | colorTitle="# |
+ | if (app.FileExists( "Img/ | ||
+ | tColGauche= app.CreateImage(" | ||
+ | tColGauche.SetMargins( 0.1, | ||
+ | } else { | ||
+ | tColGauche=app.CreateText(" | ||
+ | tColGauche.SetTextColor( colorTitle ); | ||
+ | } | ||
lh1.AddChild(tColGauche); | lh1.AddChild(tColGauche); | ||
- | | + | |
- | | + | |
- | //tColCentre=app.CreateText(" | + | if (app.FileExists( " |
- | | + | tColCentre=app.CreateImage(" |
+ | tColCentre.SetMargins( 0.29,0.003,0.29,0.004 ); | ||
+ | } else { | ||
+ | tColCentre=app.CreateText(" | ||
+ | tColCentre.SetTextColor( colorTitle | ||
+ | } | ||
lh1.AddChild(tColCentre); | lh1.AddChild(tColCentre); | ||
- | | + | |
- | | + | |
- | //tColDroite=app.CreateText(" | + | if (app.FileExists( " |
- | | + | tColDroite=app.CreateImage(" |
+ | tColDroite.SetMargins( 0,0.003,0.1,0.004 ); | ||
+ | } else { | ||
+ | tColDroite=app.CreateText(" | ||
+ | tColDroite.SetTextColor( colorTitle | ||
+ | } | ||
lh1.AddChild(tColDroite); | lh1.AddChild(tColDroite); | ||
- | tColDroite.SetMargins( 0, | + | |
- | | + | |
- | //var colorTitle="# | + | |
- | // | + | |
- | // | + | |
- | // | + | |
- | + | ||
// faire des listes | // faire des listes | ||
| | ||
Line 113: | Line 132: | ||
//Create buttons width columns. | //Create buttons width columns. | ||
btnD = app.CreateButton( " | btnD = app.CreateButton( " | ||
- | //lh3.AddChild( btnD ); | + | |
| | ||
btnT = app.CreateButton( " | btnT = app.CreateButton( " | ||
- | //lh3.AddChild( btnT ); | + | |
| | ||
btnF = app.CreateButton( " | btnF = app.CreateButton( " | ||
- | //lh3.AddChild( btnF ); | + | |
| | ||
Line 150: | Line 169: | ||
- | function | + | function |
// pas certain des separateurs: | // pas certain des separateurs: | ||
var itemString=list.GetList("," | var itemString=list.GetList("," | ||
Line 163: | Line 182: | ||
} | } | ||
} | } | ||
+ | function emptyList(list) | ||
+ | // I learnt this is possible | ||
+ | list.SetList("" | ||
+ | | ||
Line 198: | Line 221: | ||
// | // | ||
| | ||
- | | + | |
| | ||
| | ||
Line 255: | Line 278: | ||
{ | { | ||
var objet = results.rows.item(0) | var objet = results.rows.item(0) | ||
- | | + | //emptyList( lstRight ); |
var arraytext= parseSqliteMasterSql( objet[' | var arraytext= parseSqliteMasterSql( objet[' | ||
| | ||
Line 332: | Line 355: | ||
</ | </ | ||
+ | |||
+ | enjoyed? | ||
+ | --- // | ||