/examples/widestringstreaming/mainunit.lrs

http://github.com/graemeg/lazarus · Unknown · 39 lines · 39 code · 0 blank · 0 comment · 0 complexity · addc2ba12b3c8d25e75e7b599c092659 MD5 · raw file

  1. LazarusResources.Add('TStreamDemoForm','FORMDATA',[
  2. 'TPF0'#15'TStreamDemoForm'#14'StreamDemoForm'#7'Caption'#6#28'Streaming compo'
  3. +'nents example'#12'ClientHeight'#3#229#1#11'ClientWidth'#3#13#2#8'OnCreate'#7
  4. +#10'FormCreate'#13'PixelsPerInch'#2'p'#18'HorzScrollBar.Page'#3#12#2#18'Vert'
  5. +'ScrollBar.Page'#3#228#1#4'Left'#3'$'#1#6'Height'#3#229#1#3'Top'#3#168#0#5'W'
  6. +'idth'#3#13#2#0#6'TLabel'#10'Note1Label'#7'Caption'#6'UThis example demonstr'
  7. +'ates, how to stream a component to a stream in binary format ...'#5'Color'#7
  8. +#6'clNone'#11'ParentColor'#8#8'WordWrap'#9#4'Left'#3#253#0#6'Height'#2'+'#3
  9. +'Top'#2#27#5'Width'#3#196#0#0#0#6'TLabel'#10'Note2Label'#7'Caption'#6#236'..'
  10. +'. and how to reconstruct the component from a stream. This technique can be'
  11. +' used to save components to disk or to transfer them via network. Of course'
  12. +' this also works for your own classes as long as they are descendants of TC'
  13. +'omponent.'#5'Color'#7#6'clNone'#11'ParentColor'#8#8'WordWrap'#9#4'Left'#3#9
  14. +#1#6'Height'#2'g'#3'Top'#3'E'#1#5'Width'#3#228#0#0#0#9'TGroupBox'#14'SourceG'
  15. +'roupBox'#7'Caption'#6#6'Source'#12'ClientHeight'#2'I'#11'ClientWidth'#3#191
  16. +#0#8'TabOrder'#2#0#4'Left'#2#15#6'Height'#2'Z'#3'Top'#2#25#5'Width'#3#195#0#0
  17. +#9'TGroupBox'#9'AGroupBox'#7'Caption'#6#9'AGroupBox'#12'ClientHeight'#2#26#11
  18. +'ClientWidth'#2'|'#8'TabOrder'#2#0#4'Left'#2#23#6'Height'#2'+'#3'Top'#2#15#5
  19. +'Width'#3#128#0#0#0#0#9'TGroupBox'#19'DestinationGroupBox'#7'Anchors'#11#6'a'
  20. +'kLeft'#8'akBottom'#0#7'Caption'#6#11'Destination'#12'ClientHeight'#2'\'#11
  21. +'ClientWidth'#3#211#0#8'TabOrder'#2#1#4'Left'#2#30#6'Height'#2'm'#3'Top'#3'h'
  22. +#1#5'Width'#3#215#0#0#0#7'TButton'#19'WriteToStreamButton'#25'BorderSpacing.'
  23. +'InnerBorder'#2#4#7'Caption'#6#28'1. Write AGroupBox to stream'#7'OnClick'#7
  24. +#24'WriteToStreamButtonClick'#8'TabOrder'#2#2#4'Left'#2#23#6'Height'#2#25#3
  25. +'Top'#3#130#0#5'Width'#3#197#0#0#0#9'TGroupBox'#14'StreamGroupBox'#7'Anchors'
  26. +#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Caption'#6'3Stream (specia'
  27. +'l characters are shown as hexnumbers)'#12'ClientHeight'#2's'#11'ClientWidth'
  28. +#3#236#1#8'TabOrder'#2#3#4'Left'#2#15#6'Height'#3#132#0#3'Top'#3#170#0#5'Wid'
  29. +'th'#3#240#1#0#5'TMemo'#10'StreamMemo'#5'Align'#7#8'alClient'#13'Lines.Strin'
  30. +'gs'#1#6'5First click on the button above, then on button below'#0#8'ReadOnl'
  31. +'y'#9#8'TabOrder'#2#0#6'Height'#2'_'#5'Width'#3#236#1#0#0#9'TCheckBox'#19'St'
  32. +'reamAsLFMCheckBox'#5'Align'#7#8'alBottom'#7'Caption'#6#31'Show sream in LFM'
  33. +' format (text)'#8'OnChange'#7#25'StreamAsLFMCheckBoxChange'#8'TabOrder'#2#1
  34. +#6'Height'#2#20#3'Top'#2'_'#5'Width'#3#236#1#0#0#0#7'TButton'#16'ReadStreamB'
  35. +'utton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2
  36. +#4#7'Caption'#6#31'2. Create component from stream'#7'OnClick'#7#21'ReadStre'
  37. +'amButtonClick'#8'TabOrder'#2#4#4'Left'#2#25#6'Height'#2#24#3'Top'#3'<'#1#5
  38. +'Width'#3#215#0#0#0#0
  39. ]);