[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

How do I...



I have an application I am developing on a Linux system.  I decided to use
GTK to build an interface.  For the most part while I am confused and
overwhelmed, I have the basic ideas working and a simple initial version.

I am writing an emulator for an old CPU.  I wanted to create a display that
sort of mimics the original display, or at least imparts the same visual
information.  I have a set of registers that I would like to display as
buttons(already doing that), and each represents a bit in the mimiced
register.  That all works...  Now the part I cannot seem to get to work...

Simple example...  a button.  I have a callback function that toggles the
bit everytime the button is clicked on.  I want the label to represent the
state of the data.  Example:
               +-+
   Switches:   |0| <-- text example of a button...:)
               +-+

      when "clicked", the label changes to "1"  and when clicked again
      back to "0".  I have it working except that I cannot get the label
      to be updated.

  What function do I call to cause the label to change?  I am using the code
in table.c from the examples to do this.  I have all my registers displaying
and the "interface" works except for this.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]