Comments (4)
@jpercyasnet You not tried do something like https://stackoverflow.com/a/8383141/2604116 ?
from examples.
This is the rust code when button is clicked. addition code is added later to update the progress bar but even the first set does not update.
//----------------- list button start -----------------------------------
let directory_combobox_weak2 = directory_combobox.downgrade();
let messageval_label_weak2 = messageval_label.downgrade();
let from_entry_weak2 = from_entry.downgrade();
let to_entry_weak2 = to_entry.downgrade();
let iconsize_entry_weak2 = iconsize_entry.downgrade();
let icon_view_weak2 = icon_view.downgrade();
let progress_progressbar_weak2 = progress_progressbar.downgrade();
listgroup_button.connect_clicked(clone!(directory_combobox_weak2, messageval_label_weak2, from_entry_weak2, to_entry_weak2, iconsize_entry_weak2, progress_progressbar_weak2 => move|_| {
let directory_combobox = upgrade_weak!(directory_combobox_weak2);
let messageval_label = upgrade_weak!(messageval_label_weak2);
let from_entry = upgrade_weak!(from_entry_weak2);
let to_entry = upgrade_weak!(to_entry_weak2);
let iconsize_entry = upgrade_weak!(iconsize_entry_weak2);
let icon_view = upgrade_weak!(icon_view_weak2);
let progress_progressbar = upgrade_weak!(progress_progressbar_weak2);
progress_progressbar.set_fraction(0.5);
.
.
.
}
from examples.
from your suggested discussion, to execute progressbar.set_fraction one has to use this code:
progress_progressbar.set_fraction(somef64variable);
while gtk::events_pending() {
gtk::main_iteration_do(true);
}
I really appreciate your assistance.
from examples.
GTK signals are always blocking operations. This means that if you need to do a long-running task, it should be spawned in the background. How you keep up with progress is up to you -- atomics are often a good idea alongside a gtk::idle_add()
to check up with the progress over time.
from examples.
Related Issues (20)
- Clone_macros doesn't work HOT 7
- Example for GtkSwitcher usage
- could not compile `gtk-rs-examples` HOT 3
- Add an example with mutable state HOT 1
- How to set app menu bar on macOS? HOT 2
- How to display TreeView backed by a Vec of Rust objects HOT 9
- Example of STYLE_CLASS_* constants
- A command-line flags example
- in basic_subclass exmaple, the Private struct is exposed to gtk
- Fatal Crash with Drag and Drop on Mac OS X HOT 3
- windows build error HOT 1
- macOS Details (menu bar + docks)
- MenuBar and Toolbar with Glade and Actions
- MacOS overlay broken
- Come up with a way to handle panics
- Example with multi selection with header rows
- Cannot build basic.rs HOT 2
- No examples with Popover/PopoverMenu
- Add Glade signal handlers example if applicable HOT 1
- Put DEPRECATION notice in README 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 examples.