Search found 784 matches

by BruceSteers
Tuesday 21st June 2022 8:24pm
Forum: General
Topic: Ideas for an auto-updater
Replies: 2
Views: 61

Re: Ideas for an auto-updater

Hi, folks -------------------------------------------------- The Scenery --------------------------- I've made at about 20 integrated programs for the same company (sales, production, invoicing, laboratory, etc) using gambas and postgres. The database runs on a local network server and each program...
by BruceSteers
Tuesday 21st June 2022 7:49pm
Forum: Beginners
Topic: Foreground of qt5.textedit.
Replies: 5
Views: 225

Re: Foreground of qt5.textedit.

I just discovered another magic property TextEdit1.Format http://gambaswiki.org/wiki/comp/gb.qt4.ext/.textedit.format Thanks to James on the gambas mailing list https://lists.gambas-basic.org/pipermail/user/2022-June/076305.html With that you can quickly get or set various things at current cursor p...
by BruceSteers
Wednesday 15th June 2022 10:24am
Forum: General
Topic: something happened to the Gambas GUI
Replies: 5
Views: 197

Re: something happened to the Gambas GUI

what version gambas is it you use?

I have no problems with dev-branch

gambas stable hasn't been updated for 2 months so if the problem has only just started then maybe you have another problem?

did you update the system?

did you try gambas with GTK and QT to see if it's a gui-toolkit error?
by BruceSteers
Sunday 12th June 2022 1:46pm
Forum: Beginners
Topic: Foreground of qt5.textedit.
Replies: 5
Views: 225

Re: Foreground of qt5.textedit.

. See my post here Seany https://forum.gambas.one/viewtopic.php?f=15&t=1338 I discovered the TextEdit1.Selection.RichText property that would be like having a TextEdit1.InsertRichText() method to insert html code at the cursor position. PS. I found you can not just insert unfilled html code for exam...
by BruceSteers
Sunday 12th June 2022 7:58am
Forum: Beginners
Topic: Richtext Cursor position
Replies: 5
Views: 220

Re: Richtext Cursor position

I've attached your source modified with the above keypress event I also set the forms Arrangement property to Arrange.Vertical and .TextEdit1.Expand removed the need for your manual arrangement in the Resize event (Like Cogier said you should experiment with form layouts Panel.Arrangement properties...
by BruceSteers
Sunday 12th June 2022 7:09am
Forum: Beginners
Topic: Richtext Cursor position
Replies: 5
Views: 220

Re: Richtext Cursor position

I did some investigating. Seems the magic property is TextEdit1.Selection.RichText Note that TextEdit.Text has NO html formatting so any time you use TextEdit.RichText = Replace(TextEdit.Text,"\n", "<br>") you remove all other html code. Setting TextEdit.Selection.RichText property works like a .Ins...
by BruceSteers
Saturday 11th June 2022 4:57pm
Forum: Beginners
Topic: Richtext Cursor position
Replies: 5
Views: 220

Re: Richtext Cursor position

PS. you have a bit more coding to do if you only want the newly inputted characters to be a different colour.

you TextEdit.RichText line starts with the colour setting so ALL text will be that color
by BruceSteers
Saturday 11th June 2022 4:52pm
Forum: Beginners
Topic: Richtext Cursor position
Replies: 5
Views: 220

Re: Richtext Cursor position

Okay, oddly it works as expected when you save the TextEdit.Pos but recall it as TextEdit.Index also you must note the following... You are doing the processing in the KeyPress event handler, this is an intercept to the controls own Keypress event that inputs characters, the TextEdit1_Keypress you e...
by BruceSteers
Saturday 11th June 2022 11:30am
Forum: Beginners
Topic: Foreground of qt5.textedit.
Replies: 5
Views: 225

Re: Foreground of qt5.textedit.

It's RichText so it's HTML based. the Foreground does not seem to do anything. But code like this will work..... Public Sub ToolButton1_Click() TextEdit1.RichText = ("New String <font color=red>This is a red part </font> and this is not") End Notes: RichText is not full HTML only basic. Setting Text...
by BruceSteers
Tuesday 07th June 2022 7:54pm
Forum: General
Topic: Using clipboard with gambas script. [SOLVED]
Replies: 2
Views: 164

Re: Using clipboard with gambas script. [SOLVED]

here is a way your script could get the clip then paste a clip. this way you have 5 seconds to paste something. #!/usr/bin/env gbs3 ' Gambas script file Use "gb.gui" Public Sub Main() ' Get clipboard Dim txt As String = Clipboard.Paste("text/plain") If txt.Len > 1 Then Message.Error("bad clip\n" & t...