[SOLVED] Tools Property

Answered Closed
0
0

Hi,

I’ve tested Tools property for TextBox and it looks great. Window/Forms will now be free from so many lookup buttons and it will be cleaner now. But can you make it visible only when the control has focus even if it’s Visible property is set to true.

Should we expect the same feature in DataGridView  cell editor as per my opinion here: https://wisej.com/support/question/control-enhancements.

Am I asking for too much?

Thanks.

  • You must to post comments
Best Answer
0
0

Hi Cris,

We can add a property to the tool to hide it when losing the focus. Will log it as an enhancement. It’s easy to add.

All the cell editors use the equivalent edit control. You can alteady add the tools if you override or attach the edit initialization event. I will add an enhancement to make the property Tools available for the applicable DGV cell classes.

Best,
Luca

  • You must to post comments
0
0

Wisej has taken control of your pc camera. 🙂

Wordpress and other CMS read the gravatar from gravatar.com, which in turn probably loads them from various providers. Your gravatar is the md5 hash of your email address:

http://2.gravatar.com/avatar/ef0ce49f10322041268292d4c74952ba

https://en.gravatar.com/site/implement/hash/

If you set up a profile image in gmail it will be used by all sites reading gravatars.

  • You must to post comments
0
0

I don’t know why I have my picture  here. There is no registration at all. I use my Gmail address on all comments. I guess my pivture comes my Gmail account..

  • You must to post comments
0
0

Dear Tiago,

By the way, I was wondering how come you are the only one with a picture next to your name… Have I missed some registration procedure?

Best,
Alex

  • You must to post comments
0
0

Dear Tiago,

I didn’t need to restart! In fact, after updating to the latest wisej version (1.2.40), my tools showed up.

Many thanks for your help.

Alex

  • You must to post comments
0
0

Hi Alex.

There’s nothing wrong with your code. I tryed it on my own project (copy&paste) and it runs all right. So… other than suggesting a computer restart :), I can’t help you.

  • You must to post comments
0
0

Hi Tiago,

Thanks for your answer. But I can’t make it work. I do the same as the steps you mention, but in my code, not using the designer. As soon as I create the ComponentTool, i.e. uncomment the first of the commented out lines in the following, I get and empty screen….

Thanks again.
Alex

public partial class Window7 : Form
{
public Window7()
{
InitializeComponent();

var text = new TextBox();
text.Left = 100;
text.Top = 100;
this.Controls.Add(text);

//var tool = new ComponentTool();
//tool.Position = LeftRightAlignment.Left;
//tool.ImageSource = “tab-close”;
//tool.ToolTipText = “Push this to get magic!”;
//text.Tools.Add(tool);
}
}

  • You must to post comments
0
0

Alex,

One of the previous builds had a problem with tools that caused the creation of the widgets to stop.

Best,

Luca

  • You must to post comments
0
0

Hi Tiago,

The property to hide the tools when losing the focus is not there yet. It needs to be defined better.

All DGV columns with editors that support tools have the Tools property and are all implemented.

Best,

Luca

  • You must to post comments
0
0

As per 2.1.40.0, replace System.EventHandler by Wisej.Web.ToolClickEventHandler

This same version introduces cell Tools. Use the designer and set the Tools on the relevant column. You must also set CellToolClick event handler.

  • You must to post comments
0
0

Hi Alex,

I just used the designer and  to add componentTool1 Tool to txtAddress TextBox it generated the following code:

Wisej.Web.ComponentTool componentTool1 = new Wisej.Web.ComponentTool();

...

componentTool1.ImageSource = "tab-close";
componentTool1.Name = "clear";
componentTool1.ToolTipText = "ClearTextBox";
this.txtAddress.Tools.AddRange(new Wisej.Web.ComponentTool[] {
componentTool1});

...

this.txtAddress.ToolClick += new System.EventHandler(this.txtAddress_ToolClick);

and also the event handler

private void txtAddress_ToolClick(object sender, EventArgs e)
{
txtAddress.Text = string.Empty;
}

  • You must to post comments
0
0

Hi guys,

I’m trying to get a Tools in a Textbox, but as soon as I add a Tool to the tools collection, the form becomes invisible. What am I missing? Can you share a piece of implementation code? Below the code I’m using.

Best,
Alex

 

………………………………………

var fOtherForm = new Form();
fOtherForm.MdiParent = this;
fOtherForm.Show();

var text = new TextBox();
text.Left = 100;
text.Top = 100;
fOtherForm.Controls.Add(text);

var tools = new ComponentToolCollection(text);
var tool = new ComponentTool();
tool.Position = LeftRightAlignment.Left;
tool.ToolTipText = “Push this to get magic!”;

// Up to here, the TextBox is visible in the form, after the following line I get an empty screen!

tools.Add(tool);

……………………….

  • You must to post comments
0
0

Hi Luca,

There are 2 issues on this thread:

  1. add a property to the tool to hide it when losing the focus – what’s the status on this?
  2. make the property Tools available for the applicable DGV cell classes – as far as I tested, this isn’t ready (at least for DataGridViewTextBoxCell).
  • You must to post comments
0
0

Hi Luca,

That’s great. It seems that the framework is very flexible and it’s always ready for an enhancement.

Regards.

  • You must to post comments
Showing 14 results