Forum Replies Created
-
AuthorPosts
-
in reply to: BunifuMaterialTextBox #72337
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)
- This reply was modified 6 years, 3 months ago by Wilfred Kimura.
- This reply was modified 6 years, 3 months ago by Wilfred Kimura.
in reply to: Winforms Expanding Menu #48177Hi 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.
in reply to: Winforms Expanding Menu #47786Hi Kevin,
Are you talking about an Accordion Menu or a Navigation Drawer (like Android)?
in reply to: VScrollBar #45227Hi 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.in reply to: VScrollBar #44825Hi 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);
in reply to: VScrollBar #44360Hi 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 }
- This reply was modified 6 years, 7 months ago by Wilfred Kimura.
in reply to: VScrollBar #44348Hi 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.- This reply was modified 6 years, 7 months ago by Wilfred Kimura.
- This reply was modified 6 years, 7 months ago by Wilfred Kimura.
- This reply was modified 6 years, 7 months ago by Wilfred Kimura.
- This reply was modified 6 years, 7 months ago by Wilfred Kimura.
- This reply was modified 6 years, 7 months ago by Wilfred Kimura.
in reply to: VScrollBar #44321Hi 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”. -
AuthorPosts