Discussions related to Visual Prolog
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

Dynamically change font in projectToolbar Static Text

Unread post by Harrison Pratt »

Is there a way to dynamically change the font in the projectToolbar beyond the options in the IDE wizard?

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.
Post Reply