WPPanel procedure TWPComboBox.UpdateSel

  • Here I added some code to get the right things.

    There are a lot of functions making the same or should make the same, but do not do it.

    Irgendwie sehe ich keinen roten Faden. Viele Sachen kann man so oder so machen. Am Ende sollte dann das gleiche rauskommen. Tut es oft, manchmal aber eben nicht. Dann biste am Suchen und Gucken.
    Bei so vielen Funktionen sollte ein "empfohlener Weg" beschrieben werden. Den kann ich nicht finden.

    Viele Grüße

    • Offizieller Beitrag

    Hi,

    with the latest release the code

    if not FRTFEdit.IsSelected then
    r := FRTFEdit.CurrentCharAttr.GetFontName(f)
    else r := FRTFEdit.SelectedTextAttr.GetFontName(f);

    will already report the default or the attribute of an attached style.

    The default implementation in WPPanel will blank out the combobox when the font is not directly defined. That is not in general wrong - although we have added code like yours to the action code which controls a TBX combo box.

    Julian