[Gambas-user] Finding the TextEditor search string for FindNextString()

Bruce Steers bsteers4 at gmail.com
Mon Mar 20 15:51:22 CET 2023


On Mon, 20 Mar 2023 at 14:47, Bruce Steers <bsteers4 at gmail.com> wrote:

>
>
> Never mind.
>
> But here is a way if you need it...
> I used what i learned from the source to do the following to make a
> moveNext/Prev command ....
>
> Public Sub mnuFindNext_Click()
>
>   Dim hObject As Object = ActiveEd().TEdit1.Children[0] ' editor view
>   If hObject.Children.Count = 1 Then Return ' FFind is null so return
>   hObject = hObject.Children[1]  ' the FFind form
>   hObject.btnNext_Click
>
> End
>
> Public Sub mnuFindPrev_Click()
>
>   Dim hObject As Object = ActiveEd().TEdit1.Children[0]
>   If hObject.Children.Count = 1 Then Return
>   hObject = hObject.Children[1]
>   hObject.btnPrevious_Click
>
> End
>

Sorry i meant to edit that so it had TextEditor1 not  my pointer to it ....

Public Sub mnuFindNext_Click()

  Dim hObject As Object = TextEditor1.Children[0] ' editor view
  If hObject.Children.Count = 1 Then Return ' FFind is null so return
  hObject = hObject.Children[1]  ' the FFind form
  hObject.btnNext_Click

End

Public Sub mnuFindPrev_Click()

  Dim hObject As Object = TextEditor1.Children[0]
  If hObject.Children.Count = 1 Then Return
  hObject = hObject.Children[1]
  hObject.btnPrevious_Click

End
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230320/fa09d745/attachment.htm>


More information about the User mailing list