buenas, pues lo de la pregunta, me tranque con esto, alguien sabe hacerlo? (TextEdit de qt4)
pues no me he dado maña para saber como obtener ese texto.
Saludos
No Se Como Obtener El Texto Seleccionado De Un Textedit?[Resuelto]
Objetivo: No Se Como Obtener El Texto Seleccionado De Un Textedit?[Resuelto]
última edición por v3ctor el Lunes, 19 Noviembre 2018, 16:27; editado 2 veces
última edición por v3ctor el Lunes, 19 Noviembre 2018, 16:27; editado 2 veces
Objetivo: Re: No Se Como Obtener El Texto Seleccionado De Un Textedit?
última edición por cogier el Domingo, 18 Noviembre 2018, 17:36; editado 1 vez
¿Esto ayuda?
Parece que hay un problema con'gb.gui' así que he usado'gb.qt5'.
Parece que hay un problema con'gb.gui' así que he usado'gb.qt5'.
última edición por cogier el Domingo, 18 Noviembre 2018, 17:36; editado 1 vez
SelectedText.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | SelectedText.tar.gz | |
Tamaño: | 12.56 KB | |
Descargado: | 23 veces |
SelectedText.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | SelectedText.tar.gz | |
Tamaño: | 12.56 KB | |
Descargado: | 23 veces |
SelectedText.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | SelectedText.tar.gz | |
Tamaño: | 12.56 KB | |
Descargado: | 23 veces |
Objetivo: Re: No Se Como Obtener El Texto Seleccionado De Un Textedit?
este textedit es de qt4, la opción que usas no la tiene: TextEditor1.SelectedText
TextEdit.Select (gb.qt4.ext)
Sub Select ( [ Start As Integer, Length As Integer ] )
Define the selected text.
Start is the position of the first selected character in the text.
Length is the length of the selection.
If no argument is specified, the entire text is selected.
TextEdit.Select (gb.qt4.ext)
Sub Select ( [ Start As Integer, Length As Integer ] )
Define the selected text.
Start is the position of the first selected character in the text.
Length is the length of the selection.
If no argument is specified, the entire text is selected.
Objetivo: Re: No Se Como Obtener El Texto Seleccionado De Un Textedit?
pienso pasarme a qt5 cuando termine las referencias de Visorrv1960, asique esa solución no la tendré hasta un año y pico mas, mientras tanto tengo que encontrar alguna otra alternativa.
Objetivo: Re: No Se Como Obtener El Texto Seleccionado De Un Textedit?
la idea es poder seleccionar un texto y transformarlo por ejemplo todo a mayúsculas, para eso tengo que obtener el texto seleccionado, buscarlo en el richtext de la clase textedit y remplazar.
Objetivo: Re: No Se Como Obtener El Texto Seleccionado De Un Textedit?
Dejo un ejemplo de como cambiar la capitalización del texto seleccionado en un TextEdit.
Saludos.
Public Sub XCase_Click()
Dim tbo As Object
tbo = Last
If TextEdit1.Selected = True Then
Select tbo.Tag
Case "LCase"
TextEdit1.Selection.Text = String.LCase(TextEdit1.Selection.Text)
Case "UCase"
TextEdit1.Selection.Text = String.UCase(TextEdit1.Selection.Text)
End Select
Endif
End
Public Sub Form_Open()
TextEdit1.Text = "Texto de prueba modificable"
End
Dim tbo As Object
tbo = Last
If TextEdit1.Selected = True Then
Select tbo.Tag
Case "LCase"
TextEdit1.Selection.Text = String.LCase(TextEdit1.Selection.Text)
Case "UCase"
TextEdit1.Selection.Text = String.UCase(TextEdit1.Selection.Text)
End Select
Endif
End
Public Sub Form_Open()
TextEdit1.Text = "Texto de prueba modificable"
End
Saludos.
ejemplo-textedit-0.0.1.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | ejemplo-textedit-0.0.1.tar.gz | |
Tamaño: | 12.01 KB | |
Descargado: | 19 veces |
ejemplo-textedit-0.0.1.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | ejemplo-textedit-0.0.1.tar.gz | |
Tamaño: | 12.01 KB | |
Descargado: | 19 veces |
ejemplo-textedit-0.0.1.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | ejemplo-textedit-0.0.1.tar.gz | |
Tamaño: | 12.01 KB | |
Descargado: | 19 veces |
Objetivo: Re: No Se Como Obtener El Texto Seleccionado De Un Textedit?
última edición por v3ctor el Lunes, 19 Noviembre 2018, 16:29; editado 1 vez
bueno ahí estaba lo que buscaba: TextEdit1.Selection.Text
gracias tincho, tema resuelto.
gracias tincho, tema resuelto.
última edición por v3ctor el Lunes, 19 Noviembre 2018, 16:29; editado 1 vez
Página 1 de 1
No puede crear mensajesNo puede responder temas
No puede editar sus mensajes
No puede borrar sus mensajes
No puede votar en encuestas
No puede adjuntar archivos
Puede descargar archivos
No puede publicar eventos en el calendario
Está utilizando la versión (Lo-Fi). Para ver la versión completa del foro, haga clic aquí.
Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo
Página generada en:: 0.4649s (PHP: -79% SQL: 179%)
Consultas SQL: 50 - Debug off - GZIP Activado