Comments (5)
I found it works on kotlin:
https://nicedoc.io/msink/kotlin-libui
Screenshot:
Guess now the key is to understand the kotlin code. :)
If it works then perhaps it could be added towards control_gallery.rb ? Since the latter already
contains a LOT of demo-examples.
from libui.
I think LibUI.new_scrolling_area
is to create an area with scroll bars. It is not a widget container.
The kotlin example you gave is just a multiline_entry.
- https://github.com/msink/kotlin-libui/blob/2a9e8907dcaaa4a2c78b2a942facdb268c0e0c01/samples/hello/hello.c#L37
- https://pkg.go.dev/github.com/andlabs/ui#MultilineEntry
I think what you really want is Table or append/delete of hbox.
from libui.
In Ruby/Tk, you can use BWidget in this way.
require 'tk'
require 'tkextlib/bwidget'
root = TkRoot.new
sw = Tk::BWidget::ScrolledWindow.new(root)
sf = Tk::BWidget::ScrollableFrame.new(sw, constrainedwidth: true)
sw.set_widget(sf)
vf = sf.get_frame
vf.configure(bg: :white, borderwidth: 1, relief: :groove)
10.times do |i|
TkButton.new(vf, text: "button #{i}").pack
TkLabel.new(vf, text: "label #{i}").pack
end
sw.pack(fill: :both, expand: true)
Tk.mainloop
from libui.
from libui.
I already provide an Ruby example of scrolling_area
in Glimmer DSL for LibUI
(sorry, I didn't see this issue before as I was very busy with other stuff the last two months and had unwatched LibUI except for releases to keep myself focused on my tasks, but I just re-enabled full watching of LibUI to stay informed of issues in case I could help)
Code: https://github.com/AndyObtiva/glimmer-dsl-libui/blob/master/examples/basic_scrolling_area.rb
BTW, you can only control the scrolling programmatically on Mac, but not Windows and Linux (seems like a bug in C libui). But, you can still scroll the area manually on all platforms at least.
Otherwise, you cannot put anything in a scrolling area (like labels and buttons), yet only area content like path shapes. That said, by building area-based custom controls, you can then add your own (custom) flavors of label and button inside a scrolling area, and thus achieve your goal anyways.
If you need help in programming your app with scrolling_area
, hit me up about it with an Issue request in Glimmer DSL for LibUI. I'd be happy to help you implement it.
Cheers!
from libui.
Related Issues (20)
- Adding more than one area underneath a grid makes only the first area show up (Mac) HOT 2
- Small bug (I think) in examples/ directory, at the file called draw_text.rb HOT 2
- Addition of another example? Basic colour table - see Andy's example in glimmer-libui-dsl HOT 1
- Turing Pattern HOT 2
- [Possible bug or strange behaviour] On 2nd run the libui window is black HOT 8
- libui-ng HOT 8
- ARM64/AARCH64 Support HOT 26
- Exe wont start (Fiddle::DLError) Windows 11 Notebook HOT 14
- Glimmer DSL for LibUI Wins Fukuoka Ruby 2022 Special Award HOT 1
- libui-ng - "beta" ffi for it, for "early testing"? HOT 6
- Warning message when running LibUI::FFI.uiInit on Mac HOT 2
- Example for Parent and Child Windows HOT 8
- [Question] Field Edit sign restriction visible in GUI? HOT 1
- libui-ng related methods: how to use it? HOT 1
- Organising on https://github.com/kojix2 ? HOT 3
- Custom toplevel methods: aiming to enhance LibUI HOT 2
- Two things about libui-ng: one is a build failure with "rake"; the other is a suggestion HOT 2
- Table Selection API HOT 12
- Question: Why choose `fiddle` rather than `ffi`? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libui.