Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 17-11-2014
obum1 obum1 is offline
Miembro
NULL
 
Registrado: jun 2014
Posts: 24
Poder: 0
obum1 Va por buen camino
Cita:
Empezado por nlsgarcia Ver Mensaje
obum1,




Pregunto:

1- ¿Que versión de Windows y Delphi utilizas?.

2- ¿El componente TEdit en cuestión, tiene la propiedad MaxLength con algún valor diferente de cero?.

3- ¿Has hecho un debug para verificar si los valores son leídos correctamente del archivo .ini?

4- ¿Puedes publicar el código real que usas en el programa?, el código que publicastes en el Msg #3 no es el correcto

Revisa este código:
Código Delphi [-]
// GUARDANDO OPCIONES EN UN ARCHIVO INI

procedure TFPrincipal.GuardarINI;
var INI: TIniFile;
begin
  // Creamos el archivo INI
  INI := TINIFile.Create( ExtractFilePath( Application.ExeName ) + 'opciones.ini' );

  // Guardamos las opciones
  INI.WriteString( 'OPCIONES', 'IMPRESORA', IMPRESORA.Text );
  INI.WriteInteger( 'OPCIONES', 'COPIAS', COPIAS.Value );
  INI.WriteBool( 'OPCIONES', 'VISTAPREVIA', VISTAPREVIA.Checked );
  INI.WriteDate( 'OPCIONES', 'FECHA', FECHA.Date );
  INI.WriteTime( 'OPCIONES', 'HORA', StrToTime( HORA.Text ) );
  INI.WriteFloat( 'OPCIONES', 'MARGEN', MARGEN.Value );

  // Al liberar el archivo INI se cierra el archivo opciones.ini
  INI.Free;
end;

// CARGANDO OPCIONES DE UN ARCHIVO INI

procedure TFPrincipal.CargarINI;
var INI: TIniFile;
begin
  // Si no existe el archivo no hacemos nada
  if not FileExists( ExtractFilePath( Application.ExeName ) + 'opciones.ini' ) then
    Exit;

  // Creamos el archivo INI
  INI := TINIFile.Create( ExtractFilePath( Application.ExeName ) + 'opciones.ini' );

  // Guardamos las opciones
  IMPRESORA.Text := INI.ReadString( 'OPCIONES', 'IMPRESORA', '' );
  COPIAS.Value := INI.ReadInteger( 'OPCIONES', 'COPIAS', 0 );
  VISTAPREVIA.Checked := INI.ReadBool( 'OPCIONES', 'VISTAPREVIA', False );
  FECHA.Date := INI.ReadDate( 'OPCIONES', 'FECHA', Date );
  HORA.Text := TimeToStr( INI.ReadTime( 'OPCIONES', 'HORA', Time ) );
  MARGEN.Value := INI.ReadFloat( 'OPCIONES', 'MARGEN', 0.00 );

  // Al liberar el archivo INI se cierra el archivo opciones.ini
  INI.Free;
end;
Tomado de : Delphi al Límite - Guardando y cargando opciones

Espero sea útil

Nelson.
bueno es similaar a tu codigo, el problema guarda el ini pero cargar carga el string al edit pero no completamente y el edit esta por deafault no modifique ningun valor en maxlength.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
WINI (Windows Ini Files) Khronos Trucos 0 26-11-2008 17:14:16
detectar directorio Program Files mjjj API de Windows 4 01-07-2008 14:45:38
Resource files Delar Varios 4 25-07-2007 12:48:38
Delphi resource files español marceloalegre Varios 1 28-06-2006 22:21:35
bufrs i files xrc Varios 2 17-12-2005 11:51:22


La franja horaria es GMT +2. Ahora son las 05:33:11.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi