For the reason of needing to have a inputbox thatll just take integers to a certain amount, I was required to put
QDialogs in my uses clause, but now this doesn't work anymore:
Ive tried it without the messagedlg and it works fine so the rest of my code is good, Ive tried changing it to the
following:
But that doesnt work either, can someone help me?
Thanx allot,
BobbaFet ![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
QDialogs in my uses clause, but now this doesn't work anymore:
Code:
procedure TGRManager.btSavePlayerServerInfoClick(Sender: TObject);
begin
memoFileLoader.Clear;
memoFileLoader.Lines.LoadFromFile(GRPath + '\options.xml');
if MessageDlg('Would you like to save the changes made?',mtConfirmation,[mbYes,mbNo],0) = mrYes then
begin
if chbPlayerName.Checked then
begin
memoFileLoader.Lines[102] := '<PlayerName>' + edPlayerName.Text + '</PlayerName>';
chbPlayerName.Checked := False;
end;
if chbServerName.Checked then
begin
memoFileLoader.Lines[78] := '<MPGameName>' + edServerName.Text + '</MPGameName>';
chbServerName.Checked := False;
end;
if chbServerMOTD.Checked then
begin
memoFileLoader.Lines[79] := '<MOTD>' + edServerMOTD.Text + '</MOTD>';
chbServerMOTD.Checked := False;
end;
if chbAllowRemoteAccess.Checked then
begin
memoFileLoader.Lines[84] := '<RemoteServerAccess>' + cobAllowRemoteAccess.Text + '</RemoteServerAccess>';
chbAllowRemoteAccess.Checked := False;
end;
if chbRemoteAccessPassword.Checked then
begin
memoFileLoader.Lines[85] := '<RemoteServerPasswd>' + edRemoteAccessPassword.Text + '</RemoteServerPasswd>';
chbRemoteAccessPassword.Checked := False;
end;
if chbPreferredIP.Checked then
begin
memoFileLoader.Lines[83] := '<PreferredIP>' + edPreferredIP.Text + '</PreferredIP>';
chbPreferredIP.Checked := False;
end;
//memoFileLoader.Lines.SaveToFile(GRPath + '\options.xml');
ShowMessage(memoFileLoader.Text);
end;
end;
Ive tried it without the messagedlg and it works fine so the rest of my code is good, Ive tried changing it to the
following:
Code:
if MessageDlg('Would you like to save the changes made?',mtConfirmation,[mbYes,mbNo],0,mbYes,nil) = mrYes then
But that doesnt work either, can someone help me?
Thanx allot,
![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com