Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / BlueGui - Problem with SetSel Commands in TextEdit Box

Author
Message
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 18th Apr 2007 01:35
Can anyone tell me why the code below does not work?

it should change the font and color of part of the text but it seems to do nothing.



Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 18th Apr 2007 03:30
Yeah, fixed it.

Use this instead:


Visit the Wip!
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 18th Apr 2007 10:41
Thanks Alquerian, But it looks the same as the origional so what did you change?

Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 18th Apr 2007 19:30
I changed 'edit' to 'richedit' and removed one of the operands.

Visit the Wip!
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 19th Apr 2007 01:52 Edited at: 19th Apr 2007 01:57
OK Then heres one for you

See the Picture?

I added Syntax highlighting to it, (I Loaded the Keywords Folder)
The coloring goes off 1 Space per line, I assume as DBPro having a problem with Returns, (return key)

To fix this I need to tell what line the Text is on
How can I do this as I cant find A command for it?
I Tried this
But it dosnt seem to include Returns

Edit: The Coloring not showing too well in this picture
Black = Text
Blue = Command
Green = Numbers
Purple = Mathmatical Symbols
Red = Invalid, (Only includes Items Like Spaces?!,{}[]£%, Ect)

Attachments

Login to view attachments
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 19th Apr 2007 02:01
Try checking for Chr$(13) or Chr$(10) as these are the linefeed and carriage return characters.

Visit the Wip!
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 19th Apr 2007 02:57 Edited at: 19th Apr 2007 03:03
Thanks again

A Syntax Enable RichTextBox with only 2 required commands


Still some work to do though

Question: I don't suppost theres anywhere I could get Keyword files like with DBPro, But for other Languages? VBScript, DarkScript, Ect, I could load them at the same time, IE Choose your language Dropbox
IE: Command=Paramiters=Help
or Command==


Attachments

Login to view attachments
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 19th Apr 2007 07:49
I do not know that one. Give Google a shot or ask Hyrichter, he may know.

Visit the Wip!
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 19th Apr 2007 21:44 Edited at: 19th Apr 2007 22:30
I've added F1 Help like in DBPro as I can recognise a Keyword under the Selector, (Most of the time)

vbScript Constants as a Keyword File
Or most of them so far
I'm realy not looking forward to doing Every Command as will take a while.

Format Of Keyword Item
Keyword=HelpText=HelpFile
Discription
Keyword = Guess
HelpText = Info to place in Statusbar when Selector (Carot) is over it
HelpFile = Links to the Keywords Associated MSDN Page

I've got a few questions if anyone knows the answers
If I copy and paste a large amount of code in the RichTextBox, The Syntax updates from the first edited line to the end, But this can take a while - it only happens when I change a large amount of the RichText Contents, IE: Cut,Paste,Load

Q1. Can this be stopped or Speeded up?
Q2. if not how best to Freeze the RichTextBox so it does not Visually update until Completed?
Q3. Who's Hyrichter?

I don't have this problem when keying in text to a large document as it only updates the line the Selector is on
Problem Only when I Cut,Paste,Load

Edit

The buttons don't do anythink yet, But you get the idea
and dont judge it too harshley as i've only had blue about a week

Ho yes, Got RemStart/RemEnd to work

Attachments

Login to view attachments
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 20th Apr 2007 00:28
I couldn't answer your first 2 questions without becoming familiar with your code, however "Q3. Who's Hyrichter?" can be found here:

http://forum.thegamecreators.com/?m=forum_view&t=78701&b=8

I think his name is actually Hyrem Richter, he is the developer of CodeSurge, the best IDE currently available for DBP (IMHO).

Visit the Wip!
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 20th Apr 2007 00:51
Chears, Will look now

PS: answered question 2 myself
SetAutoUpdate Edit,0
This disables AutoRepainting the Gadget until you have made all the neccesary changes.
Pasteing up to 10 lines happens within a second or 2
Use to take about 10 seconds, could use speeding up a little more if possible though

MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 20th Apr 2007 23:40 Edited at: 20th Apr 2007 23:57
That IDE look cool

Makes mine look a bit naff


I'm working on the Syntax Checker and IDE Seperatly for now, as theres only 1 Command I need to Call to add Syntax Coloring

AddSyntaxToRichEdit(GadgetNum,Lang)

I know theres already too many IDE's for DarkBasic out there, But its a good way to learn the Blue Commands

Question
When i check for window resizing, It does not recognize it until you release the mouse button
How can I correct this?
Quote: "If EventType() = GADGET_SIZING and EventSource() = Main Then RedrawWindow()"


Attachments

Login to view attachments
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 21st Apr 2007 09:48 Edited at: 21st Apr 2007 09:49
This doesn't happen when you use setGadgetAlign because then it is handled automatically.

You see, I think this is a DBPro problem. When DBPro detects any other activity on the window except in the window itself (like moving and rescaling the window), DBP temporarely "pauzes" the program. This means all the commands like GADGET_SIZING and GADGET_SIZE, return their data right after you rescaled your window.
So, if you rescale your window with like 10 units, all 10 commands will be returned afterwards...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 22nd Apr 2007 12:49 Edited at: 22nd Apr 2007 12:51
Thanks Sven, Will try now

PS: I installed the Vista Transformation Pack 6, So I assume my IDE will wook like this in Vista


Attachments

Login to view attachments
Xolatron
18
Years of Service
User Offline
Joined: 12th Mar 2006
Location: The Star Forge Language: DBpro
Posted: 9th Jun 2007 03:35
That looks nice, MSon.

I use these functions to replace setSelStart and setSelLen (back from when I was working on IonRay IDE)



There are some other RichEdit functions in there. If you want to use them, or anything else from IonRay (The source is at http://forum.thegamecreators.com/?m=forum_view&b=8&t=57888&p=0 [although I had made some changes since that last official release]) feel free to take it.

Also, is there a WIP for your editor yet, or if not will there be one?

-Xol

Login to post a reply

Server time is: 2024-11-22 21:11:15
Your offset time is: 2024-11-22 21:11:15