This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sample_code:database_navigate [2015/04/17 00:54] yep |
sample_code:database_navigate [2015/04/23 20:59] (current) |
||
---|---|---|---|
Line 8: | Line 8: | ||
- | On My local Version, I have also 3 icons in subdirectory Img<br> | + | On My local Version, I have also 3 icons in subdirectory Img/ |
- | I leave text, the code for icons is kepts inside | + | |
+ | The code is now both for icons or text... see the 3 tCol | ||
+ | |||
+ | And if you do not have a database, use the Sample, and verify the database : MyData. | ||
enjoy. Sorry few French comments. | enjoy. Sorry few French comments. | ||
Line 79: | Line 82: | ||
remindColumn.SetTextColor( colorTitle ); | remindColumn.SetTextColor( colorTitle ); | ||
| | ||
- | tColGauche=app.CreateText("db files", | + | // titles 3 columns, |
- | //tColGauche= app.CreateImage(" | + | 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); | ||
- | | + | tColGauche.SetOnTouch( btnD_OnTouch ); |
- | | + | |
- | + | if (app.FileExists( "Img/table.png" | |
- | | + | tColCentre=app.CreateImage(" |
- | //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); | ||
- | | + | tColCentre.SetOnTouch( btnT_OnTouch ); |
- | | + | |
- | + | if (app.FileExists( "Img/column.png" | |
- | | + | tColDroite=app.CreateImage(" |
- | //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); | ||
- | // | + | |
- | | + | |
- | var colorTitle="# | ||
- | tColGauche.SetTextColor( colorTitle ); | ||
- | tColCentre.SetTextColor( colorTitle ); | ||
- | tColDroite.SetTextColor( colorTitle ); | ||
- | | ||
// faire des listes | // faire des listes | ||
| | ||
Line 157: | Line 170: | ||
- | function | + | function |
// pas certain des separateurs: | // pas certain des separateurs: | ||
var itemString=list.GetList("," | var itemString=list.GetList("," | ||
Line 170: | Line 183: | ||
} | } | ||
} | } | ||
+ | function emptyList(list) | ||
+ | // I learnt this is possible | ||
+ | list.SetList("" | ||
+ | | ||
Line 205: | Line 222: | ||
// | // | ||
| | ||
- | | + | |
| | ||
| | ||
Line 262: | Line 279: | ||
{ | { | ||
var objet = results.rows.item(0) | var objet = results.rows.item(0) | ||
- | | + | //emptyList( lstRight ); |
var arraytext= parseSqliteMasterSql( objet[' | var arraytext= parseSqliteMasterSql( objet[' | ||
| |