I read the file in (100-200 lines) and show it in a list box.
The user will double click the line they want to edit and it shows in an EditBox.
My problem is in 'posting' the edited data back to the List Box.
This replaces the entire entry in the List Box.
Is there a way to update just the one line?
Code: Select all
Dialog>OMXChecker
object OMXChecker: TForm
Left = 237
Top = 113
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'OMX Verifier'
ClientHeight = 231
ClientWidth = 272
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 16
Top = 16
Width = 81
Height = 41
Caption = 'Select a line. Edit the entry. Then click Post'
WordWrap = True
end
object lbFullText: tMSListBox
Left = 8
Top = 72
Width = 249
Height = 73
ItemHeight = 13
TabOrder = 0
SelectedIndex = -1
end
object ebNewEntry: TEdit
Left = 10
Top = 157
Width = 183
Height = 25
TabOrder = 10
end
object btnPost: tMSButton
Left = 14
Top = 193
Width = 91
Height = 25
Caption = 'Post Changes'
DoubleBuffered = True
ParentDoubleBuffered = False
TabOrder = 11
DoBrowse = False
BrowseStyle = fbOpen
end
end
EndDialog>OMXChecker
ADH>OMXChecker,lbFullText,OnDblClick,EditLine
ADH>OMXChecker,btnPost,OnClick,Post
SDP>OMXChecker,lbFullText,Text,abc%CRLF%123%CRLF%xyz%CRLF%PQR
Show>OMXChecker,r
SRT>EditLine
GDP>OMXChecker,lbFullText,SelectedItems,TextLine
SDP>OMXChecker,ebNewEntry,Text,TextLine
END>EditLine
SRT>Post
GDP>OMXChecker,ebNewEntry,Text,NewText
GDP>OmaxChecker,lbFullText,SelectedItems,CurrentSelection
Let>OMXChecker.lbFullText.ItemIndex=CurrentSelection
SDP>OMXChecker,lbFullText,Text,NewText
END>Post