Gtk4 widget set_margin_left

Hello

I have a basic Gtk::box widget:

    let gtk_box = gtk::Box::builder()
        .orientation(gtk::Orientation::Vertical)
        .build();

I am trying to set margins on it. gtk_box.set_margin_top(15) works. But for some reason gtk_box.set_margin_left(15) gives the following error:

error[E0599]: no method named `set_margin_left` found for struct `gtk4::Box` in the current scope
   --> src\ui.rs:109:13
    |
109 |     gtk_box.set_margin_left(25);
    |             ^^^^^^^^^^^^^^^ method not found in `gtk4::Box`

What is the problem here?

N.v.m: gtk_box.set_margin_start(15) works.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.