Sysnative Template Editor Feedback

x BlueRobot

Administrator
Staff member
Joined
May 7, 2013
Posts
10,400
I've decided to create a new thread for the feedback on my Sysnative Template Editor program here, and I'm going to post some screenshots explaining the program:

Font BB Code.JPG

All the basic font BB Code is listed on the right pane/side of the program, and includes alignments; font size; font type/family and font formatting.

BB Code For Addtional Options.JPG

There is additional BB Code options to support HTML; Code and PHP tags. BB Code for Video and URL links, and support for BB Code for colours too. You will need to add quotes around the hexadecimal value for the colour though, before posting to the forum.

The More Colours button brings up a colour dialog box which changes the the colour of the text in the rich text box.

Any suggestions are welcome :)
 

Attachments

Hi Harry,

When you want to apply two sets of tags to a word, you have to reselect the word before clicking the button. Say I wanted to make it bold and blue, I would have to select the text, click the bold button, but then it gets deselected before I have the chance to make it blue. IMO, it would be better if, when you clicked a button, both the word and the new tags get selected, so they can all be wrapped in new tags :)

Great work though!

Tom
 
Thanks for your feedback, I know it needs work doing to it, but I'll get it finished eventually :thumbsup2:

I'm still learning as I go along :)
 
I've added BB Code for Images and added extra colours, the Colour Dialog box will now give a message about Hexadecimal value for the selected colour.

I'm going to work on Tom's suggestion if I can :)
 

Attachments

What about adding a preview button?

It looks good - if you have the time and inclination to develop it even further, it would be useful if you managed to develop a full canned speech manager. Somewhere I can store several hundred canned speeches, with all the BBCode function you've already designed. Perhaps a sidebar with a list of saved speeches?
 
What about adding a preview button?

It looks good - if you have the time and inclination to develop it even further, it would be useful if you managed to develop a full canned speech manager. Somewhere I can store several hundred canned speeches, with all the BBCode function you've already designed. Perhaps a sidebar with a list of saved speeches?

That's what I'm going to do :)
 
What about adding a preview button?

It looks good - if you have the time and inclination to develop it even further, it would be useful if you managed to develop a full canned speech manager. Somewhere I can store several hundred canned speeches, with all the BBCode function you've already designed. Perhaps a sidebar with a list of saved speeches?

That's what I'm going to do :)

Very excited for this!!!!
 
Use the *better* Menubar control :) Can you find it on your own? That toolstrip you are using is a default, but not the best one in my opinion.
 
Code:
private void [B]toolStripMenuItem2[/B]_Click(object sender, EventArgs e)
        {
           const word As string = richTextBox1.Text;
            richTextBox1.Select(richTextBox1.Text(indexof(word, StringComparsion.Ordinal), word.Length));
            richTextBox1.SelectionColor = Color.Red;
            richTextBox1.SelectionFont = new Font(richTextBox1.Font.FontFamily, richTextBox1.Font.Size, FontStyle.Bold);
        }

The tool strip menu item is Preview Template, need to change the name so it makes more sense.

Original Code:

Code:
[FONT=verdana]Public Sub MainMethod()
    Const word As String = "simple"
    RichTextBox1.Select(RichTextBox1.Text.IndexOf(word, StringComparison.Ordinal), word.Length)
    RichTextBox1.SelectionColor = Color.Red
    RichTextBox1.SelectionFont = New Font(RichTextBox1.Font.FontFamily, RichTextBox1.Font.Size, FontStyle.Bold)
End Sub[/FONT]

Okay, so I've taken the moved the last replies from the other thread into this thread, because I thought it would be more appropriate. I'll look for the better version of menu bar too.

I was also thinking, how is the program meant to differentiate between different BBCodes, it seems that it just changes the selected text to a certain format? Wouldn't some sort of if statement work here?

Errors:




 

Attachments

  • Capture.JPG
    Capture.JPG
    27 KB · Views: 4
  • Capture2.JPG
    Capture2.JPG
    29.8 KB · Views: 2
  • Capture3.JPG
    Capture3.JPG
    32.4 KB · Views: 2
  • Capture4.JPG
    Capture4.JPG
    30.2 KB · Views: 1
Yeah, you can use Regex btw. I created a full editor that works this way. It gets tricky when you are converting BBcode to a Rich Text format because characters are removed and replaced with the formatting, which is unknown to the String itself (which only *knows* about the characters, and without formatting), so you have to work in reverse in that case. What do you mean differentiate? By what I can see, all you're doing is adding BBcode via Button clicks, so the button clicks differentiate that.. :S

Those errors don't say much until I see your code though.
 
Do you want to upload the source code of the entire program as a attachment? Or post snippets of the code you want? I've added my code for what you posted in the other thread in my last post too.

I've read some things about Regex on Stack Overflow, it's just understanding how to use it :huh:

From my understanding, the above code simply changes some selected text to some formatting, it doesn't know wherever the text contains BBCode.
 
Yes, I posted the formatting as an example because I'd assumed that you would know how to use an if statement or a switch statement to check the BBcode and decide a formatting based on that BBcode tag, which is how you would do it. Regex will retrieve the tag you want to find if you come up with a good pattern, and from there you can format multiple parts of the full text with a specific formatting (rich text format).
 
No problem, looking forward to it. We all get a moment where our brain goes into standby mode for a while lol. I think you've got it all understood, with perhaps the Regex (I hope)? Regex is easy though, intimidating at first, but very straightforward, and super super simple.
 
I think I found a part solution here:

Code:
if (richTextBox1.SelectedText.Length > 0)
            {
               if (richTextBox1.SelectedText.Contains("{B}{/B}")) {

               richTextBox1.SelectionFont = new Font(richTextBox1.Font.FontFamily, richTextBox1.Font.Size, FontStyle.Bold);
               }
            }

I think I know what the problem is though, is it because the if statement is checking if the string only contains the BBCode and nothing else? The code actually contains square brackets, but the forum seems to be omitting it out.

I've also got quite a few threads saved, for when I'm going to attempt to code a list box which shows the saved templates.

I'm guessing I have to add the IndexOf method and use that somehow?
 
I think I found a part solution here:

Code:
if (richTextBox1.SelectedText.Length > 0)
            {
               if (richTextBox1.SelectedText.Contains("{B}{/B}")) {

               richTextBox1.SelectionFont = new Font(richTextBox1.Font.FontFamily, richTextBox1.Font.Size, FontStyle.Bold);
               }
            }

I think I know what the problem is though, is it because the if statement is checking if the string only contains the BBCode and nothing else? The code actually contains square brackets, but the forum seems to be omitting it out.

I've also got quite a few threads saved, for when I'm going to attempt to code a list box which shows the saved templates.

I'm guessing I have to add the IndexOf method and use that somehow?


First, read your code and tell me why it doesn't make any sense. You would have to have selected text to bold anything that contains that bbcode with this solution, but why would you want to do that? Checking for selected text shouldn't even be part of your code here.

Check for the locations of the bbcode with regex, or, checking for starting indexes and moving along using IndexOf().

:smile9:
 
Last edited:

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top