Jump to content


Photo

CladView

Layout Resources Images Events

  • Please log in to reply
3 replies to this topic

#1 ielite

ielite
  • Members
  • 704 posts

Posted 20 January 2016 - 09:37 PM

The term "Clad" refers to newer change, worth only it's face value  (as opposed to a "Coin", which may be worth more than its face value)

 

Screenshot

 

Demo

 

The following code could be refactored in many ways, but it is a good demo for on how to use the Layout extensively.

It also does not use any styling other than default

 

Code


  • Jørn E. Angeltveit and BobLawrence like this

#2 Jørn E. Angeltveit

Jørn E. Angeltveit
  • Administrators
  • 297 posts
  • LocationNorway

Posted 21 January 2016 - 12:30 PM

Nice.

 

 

IMHO, the design could be nicer without the striped background.

 

Try to switch to one of the other CSS-templates we have.

 

Or make something custom like I've explained here:

http://smartmobilest...ith-the-design/



#3 ielite

ielite
  • Members
  • 704 posts

Posted 21 January 2016 - 03:48 PM

I agree! As I stated above, I did not use any styling.  The purpose of the Demo was to show some NESTED Layouts

 

I have updated the project to include a background style and bold for the header labels.

 

I also aligned the Grand Total to center

 

Demo

 

:)


  • Jørn E. Angeltveit likes this

#4 ielite

ielite
  • Members
  • 704 posts

Posted 21 January 2016 - 10:36 PM

I was trying to add persistent storage but can't seem to get it to work. What am i doing wrong?

 

 

procedure TForm1.FormActivated;
begin
 inherited;  
 Storage := TW3LocalStorage.Create;
 Storage.Open('CladView');  
end;


procedure TForm1.FormDeactivated;
begin
 inherited;
  Storage.setKeyStr('PennyQty', fPennyEdit.Text);
  Storage.setKeyStr('NickelQty', fNickelEdit.Text);
  Storage.setKeyStr('DimeQty', fDimeEdit.Text);
  Storage.setKeyStr('QuarterQty', fQuarterEdit.Text);
  Storage.setKeyStr('HalfQty', fHalfEdit.Text);
  Storage.setKeyStr('DollarQty', fDollarEdit.Text);
end;


procedure TForm1.InitializeObject;
begin
  inherited;
  {$I 'Form1:impl'}


   //edit boxes created above
   ...
   //read in stored quantities
   try
    fPennyEdit.Text:= Storage.getKeyStr('PennyQty','0');
    fNickelEdit.Value:= Storage.getKeyStr('PennyQty','0');
    fDimeEdit.Value := Storage.getKeyStr('PennyQty','0');
    fQuarterEdit.Value:= Storage.getKeyStr('PennyQty','0');
    fHalfEdit.Value := Storage.getKeyStr('PennyQty','0');
    fDollarEdit.Value := Storage.getKeyStr('PennyQty','0');
   except
    on e: exception do;
   end;
...                  );
end;






Also tagged with one or more of these keywords: Layout, Resources, Images, Events

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users