Forum Replies Created

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • Wilfred Kimura
    Keymaster
    Post count: 23

    Hi @Sh21_29,

    Thanks for the question. I believe you’re trying to use your own Context Menu with the Bunifu Material Textbox…

    If so, simply add your own ContextMenuStrip to your Form (with some items in it if you want it to display or none if you don’t) and use this method to set your added Context Menu to any Material Textbox control in your Form:

    For C#:

    
    /// <summary>
    /// Sets your own custom Context Menu to any Bunifu Material Textbox control.
    /// </summary>
    /// <param name="bunifuMaterialTextbox">The Bunifu Material Textbox to use.</param>
    /// <param name="contextMenuStrip">The Context Menu Strip to set.</param>
    public void SetMaterialContextMenu(Bunifu.Framework.UI.BunifuMaterialTextbox bunifuMaterialTextbox, ContextMenuStrip contextMenuStrip)
    {
        foreach (Control control in bunifuMaterialTextbox.Controls)
        {
            if (control is TextBox)
            {
                control.ContextMenuStrip = contextMenuStrip;
            }
        }
    }
    

    If VB.NET:

    
    Public Sub SetMaterialContextMenu(ByVal bunifuMaterialTextbox As Bunifu.Framework.UI.BunifuMaterialTextbox, ByVal contextMenuStrip As ContextMenuStrip)
    	For Each control As Control In bunifuMaterialTextbox.Controls
    		If TypeOf control Is TextBox Then
    			control.ContextMenuStrip = contextMenuStrip
    		End If	
    	Next control	
    End Sub
    

    Then, you can use the written methods in this manner:

    For C#:
    SetMaterialContextMenu(bunifuMaterialTextbox1, contextMenuStrip1);

    For VB.NET:
    SetMaterialContextMenu(BunifuMaterialTextbox1, ContextMenuStrip1)

    Wilfred Kimura
    Keymaster
    Post count: 23

    Hi Kevin,

    Oh, now I get you – that’s a SplitView UWP Control. I believe that’s possible in WinForms.
    We can definitely add that to a future release of Bunifu UI.
    For this, we’ll only ask for your patience in the process as we continue revamping all of our controls.

    Much thanks Kevin for this feature request.

    Wilfred Kimura
    Keymaster
    Post count: 23

    Hi Kevin,

    Are you talking about an Accordion Menu or a Navigation Drawer (like Android)?

    Wilfred Kimura
    Keymaster
    Post count: 23
    in reply to: VScrollBar #45227

    Hi Ahmad,

    Thanks for the quick update… Seems that’s a bug with the Dropdown. We can fix these two issues with the next release of the control. Some testing will also be done in order to fix any other bugs that may appear.

    Keep us updated on these and other issues you may come across.
    Much appreciated.

    Wilfred Kimura
    Keymaster
    Post count: 23
    in reply to: VScrollBar #44825

    Hi Ahmad,

    Did you add the Form code posted in the next reply in order to scroll the contents? If not, please do so.
    However, more testing will be done on this.

    Regarding the Bunifu Dropdown issue: try using the AddRange() method, for example:
    Bunifudropdown1.Items.AddRange(arr);

    Wilfred Kimura
    Keymaster
    Post count: 23
    in reply to: VScrollBar #44360

    Hi Ahmad,

    In addition to the written instructions, please don’t forget to add the below line of code inside your Form’s Shown event in order to set the end-point of the scroll bar’s movement:

    [C#]

    private void Form1_Shown(object sender, EventArgs e)
    {
        // Set the maximum scroll value.
        bunifuHScrollBar1.Maximum = flowLayoutPanel1.HorizontalScroll.Maximum;
    
        // You can also set the thumb length here.
        bunifuHScrollBar1.ThumbLength = 90;
    }

    [VB.NET]

    private sub Form1_Shown(ByVal sender As Object, ByVal e As EventArgs) Handles Form1.Shown
    {
        BunifuHScrollBar1.Maximum = flowLayoutPanel1.HorizontalScroll.Maximum
        BunifuHScrollBar1.ThumbLength = 90
    }
    Wilfred Kimura
    Keymaster
    Post count: 23
    in reply to: VScrollBar #44348

    Hi Ahmad,

    To integrate a Bunifu Vertical or Horizontal ScrollBar to a FlowLayoutPanel:

    (1) Add a FlowLayoutPanel control to your Form and set the property “AutoScroll” to false.
    (2) Add a number of controls to the FlowLayoutPanel to bring-up the horizontal scrollbar.
    (3) Add a Bunifu Horizontal ScrollBar to your Form and then double-click on it to take you to its “Scroll” event.
    (4) Then, inside the “Scroll” event, write the code below to make things happen:
    [C#]

    flowLayoutPanel1.AutoScrollPosition = new Point(
    bunifuHScrollBar1.Value, flowLayoutPanel1.AutoScrollPosition.Y);

    [VB.NET]

    flowLayoutPanel1.AutoScrollPosition = new Point(
    bunifuHScrollBar1.Value, flowLayoutPanel1.AutoScrollPosition.Y)

    (5) You may also change the thumb’s size using the property “ThumbLength”. For example: bunifuHScrollBar1.ThumbLength = 30.

    If you’d want to integrate only a Bunifu Vertical ScrollBar, here’s the code:
    [C#]

    flowLayoutPanel1.AutoScrollPosition = new Point(
    flowLayoutPanel1.AutoScrollPosition.X, bunifuVScrollBar1.Value);

    [VB.NET]

    flowLayoutPanel1.AutoScrollPosition = new Point(
    flowLayoutPanel1.AutoScrollPosition.X, bunifuVScrollBar1.Value)

    Likewise if you’d want to integrate a Bunifu Horizontal and Vertical ScrollBar in a FlowLayoutPanel, here’s the code:
    [C#]

    flowLayoutPanel1.AutoScrollPosition = new Point(
    bunifuHScrollBar1.Value, bunifuVScrollBar1.Value);

    [VB.NET]

    flowLayoutPanel1.AutoScrollPosition = new Point(
    bunifuHScrollBar1.Value, bunifuVScrollBar1.Value)

    Also, feel free to play with some design ideas around this and more.
    Hope this helps.

    Wilfred Kimura
    Keymaster
    Post count: 23
    in reply to: VScrollBar #44321

    Hi Ahmad,

    Regarding your issues:

    (1) Seems that’s a bug… We’ll fix this issue and release a new version of it. Thanks.
    (2) For integration with the FlowLayoutPanel, we can work on an example then post it later.
    (3) For the curved style, that’s a new feature we’ll be working on in the next ScrollBar release.
    (4) Yeah, you can make the thumb taller by using the ThumbLength property in your code, for example, “ThumbLength = 40”.

Viewing 8 posts - 16 through 23 (of 23 total)