Questions tagged [eframe]

eframe is the official framework library for writing apps using egui, a GUI library for Rust. Use this tag for questions about code written using eframe.

eframe is the official framework library for writing apps using egui. The app can be compiled both to run natively (cross platform) or be compiled to a web app (using WASM).

egui (pronounced "e-gooey") is a simple, fast, and highly portable immediate mode GUI library for Rust.

A good starting point for egui/eframe applications is the official eframe_template.

11 questions
1
vote
1 answer

Rust Egui, how do i set the color of a heading?

I am trying to create a heading in my Rust egui code and set its color to white, but I am unsure of how to do so. My code currently includes a function render_date that uses the colored_label function to display a date string on the screen in white…
1
vote
1 answer

How is it possible that i cant use this function?

using this github repo as a reference: https://github.com/emilk/egui/blob/master/examples/retained_image/src/main.rs Im trying to load an image into my frame using the egui_extras::RetainedImage, but it is giving me an error that the function…
0
votes
1 answer

egui::Ui::button().clicked isn't working in a for loop

I'm trying to create remove folder button in my app. But ui.button(text).clicked isn't working in a for loop. "Remove" buttons are in each folder. use eframe::{App, egui, Frame, NativeOptions, run_native}; use eframe::egui::{CentralPanel, Color32,…
Vecrix
  • 5
  • 1
0
votes
1 answer

Can't edit egui::TextEdit::singleline() text in eframe

I want to create a selectable and editable title for a folder in eframe/egui with the function egui::TextEdti::singleline(). But it needs mutable reference to string (&mut String). If I declare a variable in the function like this: let response =…
Vecrix
  • 5
  • 1
0
votes
1 answer

Spawn (mutlibe) widgets/elements using rust egui

I'm writing a calendar like todo app using Rust egui with eframe. Each todo is a combination of different widgets (text_edit_singleline and two buttons) How do I add a new todo when pressing a third button. Thank you in advance. I already tried to…
Mujk
  • 1
  • 1
0
votes
1 answer

rust compiler error: process didn't exit successfully: `target\debug\TestApp.exe` (exit code: 101)

I'm creating a EGUI app with eframe and i've been testing it and compiling it to both WASM and windows. Recently it stopped compiling to windows(exe) due to this error. error: process didn't exit successfully: `target\debug\TestApp.exe` (exit code:…
0
votes
1 answer

How can I change the value of a label in egui after creating it?

I am trying to change the string inside an egui label using a function. I made a reference to the content of the label and passed it along to the function but it doesn't change what is displayed in the application. let mut label_text = "Change…
0
votes
0 answers

Is there a way to auto resize the CentralPanel of egui(0.21.0)?

I am very new to Egui and gui making and am trying to make a application for windows, but I wanted to auto resize the CentralPanel according to the ui widgets inside of that panel, is there a way to do that? (If I am not able to resize the central…
0
votes
0 answers

Why cant i allocate a texture to the GPU memmory?

i am trying to import a backdrop for my application and using a image as that backdrop, but cant seem to get it to work. Im using this example on loading images in;…
0
votes
1 answer

How to access egui/eframe values from other widgets?

If I have a widget, say a checkbox, in a panel in an egui/frame application, and I want something in a different panel whose behaviour depends on the value of that checkbox, is there either a direct way of accessing this value from one widget to the…
palako
  • 3,342
  • 2
  • 23
  • 33
-1
votes
1 answer

expected mutable reference `&mut egui::ui::Ui` found mutable reference `&mut Ui` should not be happening

Here is the repo im using as a reference for adding a image: https://github.com/emilk/egui/blob/master/examples/retained_image/src/main.rs Im getting this error when trying to draw a image to the screen on this line of…