Titles for AdwPreferencesRow

G’day!

I’m putting together a data entry form using Python and GTK 4. So far it looks like this:

image

I’d like the two entries to have the titles “Current” and “Previous”. The template for the form looks like this:

<?xml version='1.0' encoding='UTF-8'?>
<interface>
    <template class="SpeciesForm" parent="AdwPreferencesPage">
        <property name="vexpand">True</property>
        <child>
            <object class="AdwPreferencesGroup">
                <property name="title">Taxon Names</property>
                <child>
                    <object class="AdwPreferencesRow">
                        <property name="title">Current</property>
                        <child>
                            <object class="GtkEntry" id="taxon_name_entry"/>
                        </child>
                    </object>
                </child>
                <child>
                    <object class="AdwPreferencesRow">
                        <property name="title">Previous</property>
                        <child>
                            <object class="GtkEntry" id="previous_taxon_name_entry"/>
                        </child>
                    </object>
                </child>
            </object>
        </child>
    </template>
</interface>

The documentation indicates AdwPreferencesRow has a title property:

How would i get it to display?

Many thanks,

J.R.

Have you considered using AdwEntryRow instead?

That looks good… but I’m stuck with libAdwaita 1.1 here on Mint. Perhaps I should gird my loins and figure out how to make a Flatpack.

Many thanks!

J.R.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.