I can change the text of the Static Text and can dynamically change a listButton's strings and font, but cannot figure out how to change the Text font.
Code: Select all
    onTest(_Source, _MenuTag) :-
        vpiToolbar::getToolbar_nd(getVpiWindow(), TB),
        !,
        %-- Change the font of listbutton 'idt_listbutton':
        NewFont = vpi::fontCreateByName("Arial", 20),
        LbuHw = gui_native::getDlgItem(TB, resourceIdentifiers::idt_listbutton),
        vpi::winSetFont(uncheckedConvert(windowHandle, LbuHw), NewFont),
        %
        % Change the text of toolbar text item 'idt_tbText':
        vpiToolbar::setValue(getVpiWindow(), resourceIdentifiers::idt_tbText, vpiToolbar::text_value("New Text")),
        %
        %-- Change the font of the text box:  CODE BELOW IS INCORRECT
        TxtHw = gui_native::getDlgItem(TB, resourceIdentifiers::idt_tbText),
        nothing(TxtHw), % Txt : handle = 00000000
        % cannot use this:  vpi::winSetFont(uncheckedConvert(windowHandle, TxtHw), NewFont).
        succeed.
