Profile Picture

Skin Editor

Posted By Pawel Pietrzak 6 Years Ago
Author
Message
Dmitriy Matviiets
Posted 6 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 5 Years Ago
Posts: 5, Visits: 34
Thanks for so fast response. Is there a way to set NTreeView to increase its size (length) automatically when inner nodes becomes unfolded? This is regarding issue with uncustomized scrollbar. In case if the control can adjust its size according to its content - I can put NTreeView inside some panel with better scroll bar.

Nevron Support
Posted 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi Dmitriy,

Here is some simple implementation of the requested functionality:

1. Disable scrollbars of the NTreeView

treeView.Scrollable = false;

2. Attach to NodeMouseClick event:

treeView.NodeMouseClick += TreeView_NodeMouseClick;

3. In the event handler do the following:

private void TreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
    NTreeView view = sender as NTreeView;

    int lastIndex = view.Nodes.Count - 1;
    TreeNode lastNode1stLevel = view.Nodes[lastIndex];
    TreeNode lastNode = GetNextVisibleNodeRecursive(lastNode1stLevel);
    view.Height = lastNode.Bounds.Bottom;
}

private TreeNode GetNextVisibleNodeRecursive(TreeNode node)
{
    TreeNode nextNode = node.NextVisibleNode;
    if (nextNode == null)
    {
        return node;
    }
    else
    {
        nextNode = GetNextVisibleNodeRecursive(nextNode);
    }

    return nextNode;
}



Best Regards,
Nevron Support Team



Zoltan Koch
Posted 6 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3, Visits: 36
Hello! I try to customize appearance of NTabStrip via skin editor by setting colors in custom palette. There are 2 problems:
1. Looks like palette.Control color is used as a background of tabstrip, however finally it looks lighter than a color I set. Looks like some mask is applied to the value. In order to see desired color - much dark value should be set in code.
2. not all instances of NTabStrip are affected by palette customization, some of tham just looks like default. I checked designer.cs files code and don't see any auto generated code that overrides properties that may affect appearance of the control.
Could you, pls, advice something?

Nevron Support
Posted 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi Zoltan,

Regarding the first question - indeed there is a coded change of the Control color.
To overcome this you can subclass NTabStrip and override UpdateBackColor method as follows:

public class MyNTabStrip : NTabStrip
{
    protected override void UpdateBackColor()
    {
        if (Parent == null || BackColor == Color.Transparent)
            return;

        NUIRenderer renderer = Renderer;
        Color c;

        if (renderer != null)
        {
            c = renderer.Palette.Control;
        }
        else
        {
            c = Parent.BackColor;
        }

        BackColor = c;
    }
}


Regarding the second question this may happened if NTabStrip is directly hosted into a Form.Controls and you have set the palette using NUIManager.
Try to change the hosting form to NForm or put the control in NUIPanel.
I hope this helps.
 

Best Regards,
Nevron Support Team



Zoltan Koch
Posted 6 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3, Visits: 36
Hello! Is there a way of programmatically  override forecolor of rtf content loaded into NRichTextBox? E.G. there is some old rtf doc with specific font colors but I need to display all this text in NRichTextBox with a color, that is set programmatically.



Nevron Support
Posted 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi Zoltan,
We're not sure whether you can achieve that with the MS Rich Text box as it does not expose the document structure of the RTF content you place in it. This can however easily be achieved in the rich text editor control shipped with NOV. For more information about this control you can take a look at the following page:
https://www.nevron.com/products-open-vision-nov-rich-text-editor-control-overview.aspx



Best Regards,
Nevron Support Team



Zoltan Koch
Posted 6 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3, Visits: 36
Hello!  Now we got issue regarding scrollbar in NListBox.  When I apply custom palette and then set UseCustomScrollBars to false ( in order to avoid issue with customized scrollbar which blinks and don't redraw itself on mouse events) - content becomes hidden like on this screenshots, is there a solution for getting default scrollbar inside ListBox and getting content visible ?https://www.nevron.com/forum/uploads/images/8cd984d4-4db6-48ec-a819-bfcd.pnghttps://www.nevron.com/forum/uploads/images/2c193274-bdac-4a2f-9b5a-b347.png

Nevron Support
Posted 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi Zoltan,

Can you please provide us with some example app which reproduces the problem, because we do not experience it on our site.
Thanks and sorry for the inconvenience.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic